Skip to content

Commit

Permalink
Creating new package qnipp:sharejs-ace
Browse files Browse the repository at this point in the history
  • Loading branch information
fknipp committed Mar 26, 2019
1 parent 505bc01 commit 68afd6a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion sharejs-ace/README.md
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 2 deletions sharejs-ace/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
17 changes: 10 additions & 7 deletions sharejs-ace/package.js
Original file line number Diff line number Diff line change
@@ -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({
Expand Down Expand Up @@ -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
Expand All @@ -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([
Expand Down

0 comments on commit 68afd6a

Please sign in to comment.