-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathpackage.js
30 lines (21 loc) · 1.06 KB
/
package.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Package.describe({
summary: "Easily include ace, receive reactive varibles for cursor position, editor contents, etc"
});
var bundlerApi = null
var path = Npm.require("path");
var fs = Npm.require("fs");
var packagePath = path.join(path.resolve("."), "packages", "reactive-ace");
Package.on_use(function (api, where) {
api.use(['jquery', "templating", "coffeescript", "underscore", "deps"], ["client"]);
var files = fs.readdirSync(path.join(packagePath, "ace-builds", "src"));
files.forEach(function(file){
if (file === "snippets"){return;}
api.addAssets([path.join("ace-builds", "src", file)], "client");
});
var snippets = fs.readdirSync(path.join(packagePath, "ace-builds", "src", "snippets"));
snippets.forEach(function(file){
snippetPath = path.join("ace-builds", "src", "snippets", file)
api.addAssets([snippetPath], "client");
})
api.add_files(["ace-builds/src/ace.js", "ace-builds/src/ext-modelist.js", "lib/utils.coffee", "lib/crc32.js", "lib/esprima.js", "editor.coffee", "editorSetup.coffee", "templates.html"], "client");
});