mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Added sloc package.
This commit is contained in:
parent
8cf60b4c3e
commit
0ae15f1a36
2 changed files with 16 additions and 6 deletions
|
@ -1,7 +1,8 @@
|
||||||
var fs = require('fs-extra');
|
let fs = require('fs-extra');
|
||||||
|
let sloc = require('node-sloc');
|
||||||
|
|
||||||
var source = './dist/phaser.js';
|
let source = './dist/phaser.js';
|
||||||
var dest = '../../phaser3-examples/public/build/dev.js';
|
let dest = '../../phaser3-examples/public/build/dev.js';
|
||||||
|
|
||||||
if (fs.existsSync(dest))
|
if (fs.existsSync(dest))
|
||||||
{
|
{
|
||||||
|
@ -14,6 +15,15 @@ if (fs.existsSync(dest))
|
||||||
|
|
||||||
console.log('Build copied to ' + dest);
|
console.log('Build copied to ' + dest);
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
path: './src',
|
||||||
|
extensions: [ '.js' ]
|
||||||
|
};
|
||||||
|
|
||||||
|
sloc(options).then((res) => {
|
||||||
|
console.log('Source files: ' + res.sloc.files + '\nLines of code: ' + res.sloc.sloc);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
{
|
{
|
||||||
"//": "git tag 3.0.0-beta.6",
|
|
||||||
"//": "git push",
|
|
||||||
"//": "npm publish --tag beta",
|
"//": "npm publish --tag beta",
|
||||||
"name": "phaser",
|
"name": "phaser",
|
||||||
"version": "3.0.0-beta.6",
|
"version": "3.0.0-beta.6",
|
||||||
|
@ -21,7 +19,8 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
"dist": "webpack --config webpack.dist.config.js",
|
"dist": "webpack --config webpack.dist.config.js",
|
||||||
"lint": "eslint --config .eslintrc.json \"src/**/*.js\""
|
"lint": "eslint --config .eslintrc.json \"src/**/*.js\"",
|
||||||
|
"sloc": "node-sloc './src' --include-extensions \"js\""
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"2d",
|
"2d",
|
||||||
|
@ -38,6 +37,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "^4.3.0",
|
"eslint": "^4.3.0",
|
||||||
"fs-extra": "^4.0.0",
|
"fs-extra": "^4.0.0",
|
||||||
|
"node-sloc": "^0.1.10",
|
||||||
"uglifyjs-webpack-plugin": "^0.4.6",
|
"uglifyjs-webpack-plugin": "^0.4.6",
|
||||||
"uuid": "^3.1.0",
|
"uuid": "^3.1.0",
|
||||||
"webpack": "^3.4.1",
|
"webpack": "^3.4.1",
|
||||||
|
|
Loading…
Add table
Reference in a new issue