Get codePointAt/fromCodePoint working on the server

This commit is contained in:
Shaunak Kishore
2015-09-24 23:03:46 -04:00
parent e55c9a3442
commit aff018a324
9 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1 @@
node_modules

View File

@ -0,0 +1,7 @@
This directory and the files immediately inside it are automatically generated
when you change this package's NPM dependencies. Commit the files in this
directory (npm-shrinkwrap.json, .gitignore, and this README) to source control
so that others run the same versions of sub-dependencies.
You should NOT check in the node_modules directory that Meteor automatically
creates; if you are using git, the .gitignore file tells git to ignore it.

View File

@ -0,0 +1,7 @@
{
"dependencies": {
"es6-shim": {
"version": "0.33.3"
}
}
}

View File

@ -0,0 +1,9 @@
Meteor.npmRequire = function(moduleName) {
var module = Npm.require(moduleName);
return module;
};
Meteor.require = function(moduleName) {
console.warn('Meteor.require is deprecated. Please use Meteor.npmRequire instead!');
return Meteor.npmRequire(moduleName);
};

View File

@ -0,0 +1,30 @@
var path = Npm.require('path');
var fs = Npm.require('fs');
Package.describe({
summary: 'Contains all your npm dependencies',
version: '1.2.0',
name: 'npm-container'
});
var packagesJsonFile = path.resolve('./packages.json');
try {
var fileContent = fs.readFileSync(packagesJsonFile);
var packages = JSON.parse(fileContent.toString());
Npm.depends(packages);
} catch (ex) {
console.error('ERROR: packages.json parsing error [ ' + ex.message + ' ]');
}
// Adding the app's packages.json as a used file for this package will get
// Meteor to watch it and reload this package when it changes
Package.onUse(function(api) {
api.addFiles('index.js', 'server');
if (api.addAssets) {
api.addAssets('../../packages.json', 'server');
} else {
api.addFiles('../../packages.json', 'server', {
isAsset: true
});
}
});