diff --git a/.meteor/packages b/.meteor/packages index 300097c..6d89317 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -16,3 +16,7 @@ themeteorchef:jquery-validation particle4dev:sass@0.3.0 twbs:bootstrap browser-policy +meteorhacks:npm + + +npm-container \ No newline at end of file diff --git a/.meteor/versions b/.meteor/versions index bd45a59..db975cf 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -43,6 +43,8 @@ localstorage@1.0.2 logging@1.0.6 meteor@1.1.4 meteor-platform@1.2.1 +meteorhacks:async@1.0.0 +meteorhacks:npm@1.2.2 minifiers@1.1.3 minimongo@1.0.6 mobile-status-bar@1.0.2 diff --git a/packages.json b/packages.json new file mode 100644 index 0000000..077404a --- /dev/null +++ b/packages.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/packages/.gitignore b/packages/.gitignore deleted file mode 100644 index 09755ae..0000000 --- a/packages/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -/iron-router -/blaze-layout -/sass -/bootstrap-3 -/handlebars-server -/velocity -/velocity-quick-start -/velocity-html-reporter -/jasmine-unit -/jasmine -/mocha-web-velocity -/package-stubber -/mirror diff --git a/packages/npm-container/index.js b/packages/npm-container/index.js new file mode 100644 index 0000000..1025083 --- /dev/null +++ b/packages/npm-container/index.js @@ -0,0 +1,9 @@ + Meteor.npmRequire = function(moduleName) { // 85 + var module = Npm.require(moduleName); // 86 + return module; // 87 + }; // 88 + // 89 + Meteor.require = function(moduleName) { // 90 + console.warn('Meteor.require is deprecated. Please use Meteor.npmRequire instead!'); // 91 + return Meteor.npmRequire(moduleName); // 92 + }; // 93 \ No newline at end of file diff --git a/packages/npm-container/package.js b/packages/npm-container/package.js new file mode 100644 index 0000000..91eaf73 --- /dev/null +++ b/packages/npm-container/package.js @@ -0,0 +1,21 @@ + var path = Npm.require('path'); // 97 + var fs = Npm.require('fs'); // 98 + // 99 + Package.describe({ // 100 + summary: 'Contains all your npm dependencies', // 101 + version: '1.0.0', // 102 + name: 'npm-container' // 103 + }); // 104 + // 105 + var packagesJsonFile = path.resolve('./packages.json'); // 106 + try { // 107 + var fileContent = fs.readFileSync(packagesJsonFile); // 108 + var packages = JSON.parse(fileContent.toString()); // 109 + Npm.depends(packages); // 110 + } catch(ex) { // 111 + console.error('ERROR: packages.json parsing error [ ' + ex.message + ' ]'); // 112 + } // 113 + // 114 + Package.onUse(function(api) { // 115 + api.add_files(['index.js', '../../packages.json'], 'server'); // 116 + }); // 117 \ No newline at end of file diff --git a/packages/npm-packages/package.js b/packages/npm-packages/package.js deleted file mode 100644 index b4d43cb..0000000 --- a/packages/npm-packages/package.js +++ /dev/null @@ -1,7 +0,0 @@ -Package.describe({ - summary: "Give Meteor access to NPM modules for our application." -}); - -Npm.depends({ - "fibers": "1.0.1" -});