mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-03-12 14:59:59 +00:00
fix typo in packeje.json, merge helpers
This commit is contained in:
parent
60808be6ec
commit
b481b242dc
@ -6,7 +6,7 @@ var _ = require('underscore'),
|
||||
ProjectActions = require('../../../actions/project'),
|
||||
BuildActions = require('../../../actions/build'),
|
||||
CommonComponents = require('../../common'),
|
||||
utils = require('../../../utils'),
|
||||
utils = require('../../../../lib/utils'),
|
||||
template = require('./index.jade');
|
||||
|
||||
var Component = React.createClass({
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,cyrillic-ext);*/
|
||||
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin,cyrillic-ext);
|
||||
|
||||
@libPath: "../../node_modules";
|
||||
|
||||
|
16
app/utils.js
16
app/utils.js
@ -1,16 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var utils = {};
|
||||
|
||||
utils.prune = function(str, length) {
|
||||
var result = '',
|
||||
words = str.split(' ');
|
||||
|
||||
do {
|
||||
result += words.shift() + ' ';
|
||||
} while (words.length && result.length < length);
|
||||
|
||||
return result.replace(/ $/, words.length ? '...' : '');
|
||||
};
|
||||
|
||||
module.exports = utils;
|
16
lib/utils.js
16
lib/utils.js
@ -1,9 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var _ = require('underscore'),
|
||||
sharedUtils = require('../app/utils');
|
||||
|
||||
_(exports).extend(sharedUtils);
|
||||
var _ = require('underscore');
|
||||
|
||||
exports.lpad = function(str, length, chr) {
|
||||
chr = chr || '0';
|
||||
@ -11,6 +8,17 @@ exports.lpad = function(str, length, chr) {
|
||||
return str;
|
||||
};
|
||||
|
||||
exports.prune = function(str, length) {
|
||||
var result = '',
|
||||
words = str.split(' ');
|
||||
|
||||
do {
|
||||
result += words.shift() + ' ';
|
||||
} while (words.length && result.length < length);
|
||||
|
||||
return result.replace(/ $/, words.length ? '...' : '');
|
||||
};
|
||||
|
||||
exports.toNumberStr = function(number) {
|
||||
return exports.lpad(String(number), 20);
|
||||
};
|
||||
|
@ -10,7 +10,7 @@
|
||||
"test": "npm run makeTestRepos && mocha --bail --reporter=spec --timeout 4000",
|
||||
"build-less": "lessc app/styles/index.less > static/css/index.css",
|
||||
"build-js": "browserify app/app.js -t ./transforms/jade.js | uglifyjs -mc > static/js/app.build.js",
|
||||
"watch-less": "nodemon --ext less --watch app/styles --exec 'npm run less'",
|
||||
"watch-less": "nodemon --ext less --watch app/styles --exec 'npm run build-less'",
|
||||
"watch-js": "watchify app/app.js -t ./transforms/jade.js -o static/js/app.build.js -dv",
|
||||
"watch-server": "nodemon --ignore app --ignore static --ignore node_modules --ignore data app.js",
|
||||
"dev": "npm run build-fonts && npm run watch-less & npm run watch-js & npm run watch-server",
|
||||
|
Loading…
Reference in New Issue
Block a user