mirror of
https://github.com/skishore/makemeahanzi.git
synced 2025-10-30 02:18:16 +08:00
Get codePointAt/fromCodePoint working on the server
This commit is contained in:
1
packages/npm-container/.npm/package/.gitignore
vendored
Normal file
1
packages/npm-container/.npm/package/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
node_modules
|
||||
7
packages/npm-container/.npm/package/README
Normal file
7
packages/npm-container/.npm/package/README
Normal 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.
|
||||
7
packages/npm-container/.npm/package/npm-shrinkwrap.json
generated
Normal file
7
packages/npm-container/.npm/package/npm-shrinkwrap.json
generated
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"es6-shim": {
|
||||
"version": "0.33.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
9
packages/npm-container/index.js
Normal file
9
packages/npm-container/index.js
Normal 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);
|
||||
};
|
||||
30
packages/npm-container/package.js
Normal file
30
packages/npm-container/package.js
Normal 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
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user