Skip to content
Permalink
Browse files

Creating new package qnipp:sharejs-ace

  • Loading branch information...
fknipp committed Mar 26, 2019
1 parent 505bc01 commit 68afd6ab255a6c2b1ec003a56854308f3a1286d0
Showing with 13 additions and 10 deletions.
  1. +1 −1 sharejs-ace/README.md
  2. +2 −2 sharejs-ace/client.js
  3. +10 −7 sharejs-ace/package.js
@@ -1,4 +1,4 @@
sharejs-ace
===========

Ace editor integrated with ShareJS. Please see the documentation for the `mizzao:sharejs` base package.
Ace editor integrated with ShareJS. Please see the documentation for the `edemaine:sharejs` base package.
@@ -4,10 +4,10 @@

import { Template } from 'meteor/templating'
import { Blaze } from 'meteor/blaze'
import { ShareJSConnector } from 'meteor/mizzao:sharejs'
import { ShareJSConnector } from 'meteor/edemaine:sharejs'

require('ace-builds/src-noconflict/ace');
ace.require('ace/config').set('basePath', '/packages/mizzao_sharejs-ace/.npm/package/node_modules/ace-builds/src-noconflict/');
ace.require('ace/config').set('basePath', '/packages/qnipp_sharejs-ace/.npm/package/node_modules/ace-builds/src-noconflict/');
UndoManager = ace.require('ace/undomanager').UndoManager;
import './ace'

@@ -1,8 +1,8 @@
Package.describe({
name: "mizzao:sharejs-ace",
name: "qnipp:sharejs-ace",
summary: "ShareJS with the Ace Editor",
version: "1.4.1",
git: "https://github.com/mizzao/meteor-sharejs.git"
git: "https://github.com/qnipp/meteor-sharejs.git"
});

Npm.depends({
@@ -43,7 +43,6 @@ function getFilesFromFolder(packageName, folder){

var isRunningFromApp = fs.existsSync(path.resolve("packages"));
var packagePath = isRunningFromApp ? path.resolve("packages", packageName) : "";
console.log(packagePath);

packagePath = path.resolve(packagePath);
// chdir to our package directory
@@ -60,14 +59,18 @@ Package.onUse(function (api) {

api.use(['ecmascript', 'modules', 'templating']);

api.use("mizzao:sharejs@0.9.0");
api.imply("mizzao:sharejs");
api.use("edemaine:sharejs@0.10.3-alpha.2");
api.imply("edemaine:sharejs");

var _ = Npm.require("underscore");

// Add Ace files as assets that can be loaded by the client later
var aceSettings = getFilesFromFolder("mizzao:sharejs-ace", ".npm/package/node_modules/ace-builds/src-noconflict");
api.addAssets(aceSettings, 'client');
try {
var aceSettings = getFilesFromFolder("qnipp:sharejs-ace", ".npm/package/node_modules/ace-builds/src-noconflict");
api.addAssets(aceSettings, 'client');
} catch(e) {
console.log(`Ignoring ${e}`);
}

api.mainModule('client.js', 'client');
api.addFiles([

0 comments on commit 68afd6a

Please sign in to comment.
You can’t perform that action at this time.