Title: WP CoffeeScript
Author: tombenner
Published: <strong>9 جنوري 2012</strong>
Last modified: 9 جنوري 2012

---

پلگ انس ڳولھيو

ھي پلگ ان **WordPress جي جديد 3 وڏين رليزز** سان آزمايو نه ويو آھي. اهو ٿي سگهي 
ٿو وڌيڪ برقرار يا سپورٽ نه ٿي سگهي ۽ ٿي سگهي ٿو مطابقت جا مسئلا جڏهن ورڈپریس جي 
وڌيڪ تازي ورزن سان استعمال ڪيو وڃي.

![](https://s.w.org/plugins/geopattern-icon/wp-coffeescript.svg)

# WP CoffeeScript

 کان: [tombenner](https://profiles.wordpress.org/tombenner/)

[ڊائون لوڊ ڪريو](https://downloads.wordpress.org/plugin/wp-coffeescript.1.0.zip)

 * [تفصيل](https://snd.wordpress.org/plugins/wp-coffeescript/#description)
 * [جائزو](https://snd.wordpress.org/plugins/wp-coffeescript/#reviews)
 *  [تنصيب](https://snd.wordpress.org/plugins/wp-coffeescript/#installation)
 * [ترقي](https://snd.wordpress.org/plugins/wp-coffeescript/#developers)

 [سھائتا](https://wordpress.org/support/plugin/wp-coffeescript/)

## وضاحت

WP CoffeeScript is a WordPress plugin that makes enqueueing [CoffeeScript](http://coffeescript.org)
as easy as enqueueing JavaScript. Instead of using [`wp_enqueue_script()`](https://codex.wordpress.org/Function_Reference/wp_enqueue_script),
as you would for JS, you just use `enqueue_coffeescript()`, which takes almost exactly
the same arguments. The only difference is that the second argument should be the
file path instead of the URL. If you’d like to compile multiple CS files into a 
single JS file, you can use an array of file paths as the second argument.

Please note that the [CoffeeScript executable](http://coffeescript.org/#installation)
must be installed on the server. You can also set a custom path to the executable(
see the [examples](https://github.com/tombenner/wp-coffeescript)).

If you’d like to grab development releases, see what new features are being added,
or browse the source code please visit the [GitHub repo](http://github.com/tombenner/wp-coffeescript).

### Examples

Enqueue a CoffeeScript file that’s in the theme directory:

    ```
    enqueue_coffeescript('my-handle', get_template_directory().'/my-script.coffee');
    ```

Enqueue multiple CS files, compiling them into a single output file:

    ```
    $script1 = get_template_directory().'/script1.coffee';
    $script2 = get_template_directory().'/script2.coffee';
    enqueue_coffeescript('my-handle', array($script1, $script2));
    ```

Enqueue a CS file in the footer with dependencies (the arguments are exactly the
same as in [`wp_enqueue_script()`](https://codex.wordpress.org/Function_Reference/wp_enqueue_script)):

    ```
    enqueue_coffeescript('my-handle', get_template_directory().'/my-script.coffee', array('dep1', 'dep2'), false, true);
    ```

Set a custom path to the CS executable (the default value is `coffeescript`):

    ```
    add_filter('wpcs_executable', 'set_wpcs_executable');
    function set_wpcs_executable($path) {
        return '/my/path/to/coffeescript';
    }
    ```

Compile the CS on every page load (the default behavior is to only compile when 
the JS has been modified):

    ```
    add_filter('wpcs_caching_enabled', 'disable_wpcs_caching');
    function disable_wpcs_caching($is_enabled) {
        return false;
    }
    ```

## انسٽاليشن

 1. Put `wp-coffeescript` into the `wp-content/plugins` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Make sure that the [CoffeeScript executable](http://coffeescript.org/#installation)
    is installed on the server or set a custom path to the executable (see the [examples](https://github.com/tombenner/wp-coffeescript))

## FAQ

  Where should I go for support questions or to ask for a new feature?

Please feel free to either add a topic in the WordPress forum or contact me through
GitHub for any questions:

 * [WordPress Forum](https://wordpress.org/tags/wp-coffeescript?forum_id=10)
 * [GitHub](http://github.com/tombenner)

## جائزا

ھن پلگ ان لاءِ ڪي به رايا ناھن.

## تعاون ڪندڙ & ڊولپرز

“WP CoffeeScript” اوپن سورس سافٽ ويئر آهي. ھيٺين ماڻھن ھن پلگ ان ۾ حصو ورتو آھي.

تعاون ڪندڙ

 *   [ tombenner ](https://profiles.wordpress.org/tombenner/)

[ترجمو ڪريو “WP CoffeeScript” توهان جي ٻولي ۾.](https://translate.wordpress.org/projects/wp-plugins/wp-coffeescript)

### ڊولپمينٽ ۾ دلچسپي؟

[ڪوڊ براؤز ڪريو](https://plugins.trac.wordpress.org/browser/wp-coffeescript/)، چيڪ
ڪريو [SVN مخزن](https://plugins.svn.wordpress.org/wp-coffeescript/)، يا رڪنيت حاصل
ڪريو [ڊولپمينٽ لاگ](https://plugins.trac.wordpress.org/log/wp-coffeescript/) پاران
[RSS](https://plugins.trac.wordpress.org/log/wp-coffeescript/?limit=100&mode=stop_on_copy&format=rss).

## ميٽا

 *  Version **1.0**
 *  Last updated **15 سالَ اڳ**
 *  Active installations **10+**
 *  WordPress version ** 3.0 يا وڌيڪ **
 *  Tested up to **3.3.2**
 *  Language
 * [English (US)](https://wordpress.org/plugins/wp-coffeescript/)
 * Tags
 * [coffeescript](https://snd.wordpress.org/plugins/tags/coffeescript/)[cs](https://snd.wordpress.org/plugins/tags/cs/)
   [development](https://snd.wordpress.org/plugins/tags/development/)[javascript](https://snd.wordpress.org/plugins/tags/javascript/)
   [JS](https://snd.wordpress.org/plugins/tags/js/)
 *  [ترقي يافته ڏيک](https://snd.wordpress.org/plugins/wp-coffeescript/advanced/)

## درجه بندي

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/wp-coffeescript/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-coffeescript/reviews/)

## تعاون ڪندڙ

 *   [ tombenner ](https://profiles.wordpress.org/tombenner/)

## سھائتا

چوڻ لاءِ ڪجهه آهي؟ مدد گهرجي؟

 [ڏسو سپورٽ فورم](https://wordpress.org/support/plugin/wp-coffeescript/)