mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-11 09:39:15 +00:00
remove gulp dependency, move to npm scripts
This commit is contained in:
parent
b1d1a056ee
commit
cb67114cd3
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,9 +3,7 @@ test/workspace
|
|||||||
test/distributor/workspace
|
test/distributor/workspace
|
||||||
test/repos/mercurial/
|
test/repos/mercurial/
|
||||||
test/repos/git/
|
test/repos/git/
|
||||||
static/css/**/*.css
|
static/*
|
||||||
static/fonts
|
|
||||||
static/js/*
|
|
||||||
data/projects/**/workspace
|
data/projects/**/workspace
|
||||||
data/builds
|
data/builds
|
||||||
static/index.html
|
static/index.html
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
"globals": {
|
"globals": {
|
||||||
"describe": false,
|
"describe": false,
|
||||||
"it": false,
|
"it": false,
|
||||||
"before": false,
|
"document": false,
|
||||||
"after": false
|
"before": false,
|
||||||
|
"after": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ var routes = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
connect.io.on('connect', function() {
|
connect.io.on('connect', function() {
|
||||||
console.log('on connect');
|
|
||||||
Router.run(routes, Router.HistoryLocation, function(Handler) {
|
Router.run(routes, Router.HistoryLocation, function(Handler) {
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
React.createElement(Handler),
|
React.createElement(Handler),
|
||||||
|
@ -8,8 +8,6 @@ var React = require('react'),
|
|||||||
|
|
||||||
var Component = React.createClass({
|
var Component = React.createClass({
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
console.log('read all projects in component');
|
|
||||||
console.log(ProjectActions);
|
|
||||||
ProjectActions.readAll();
|
ProjectActions.readAll();
|
||||||
},
|
},
|
||||||
render: function() {
|
render: function() {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
.builds
|
.builds
|
||||||
if !this.state.items.length
|
if !this.state.items.length
|
||||||
p Build history is empty
|
p Build history is empty
|
||||||
- console.log('>>>> builds = ', JSON.stringify(this.state.items).length, this.state.items)
|
|
||||||
each build, index in this.state.items
|
each build, index in this.state.items
|
||||||
Item(build=build, key=build.id)
|
Item(build=build, key=build.id)
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ var Reflux = require('reflux'),
|
|||||||
ProjectActions = require('../actions/project'),
|
ProjectActions = require('../actions/project'),
|
||||||
resource = require('../resources').projects;
|
resource = require('../resources').projects;
|
||||||
|
|
||||||
console.log('resource', resource);
|
|
||||||
var Store = Reflux.createStore({
|
var Store = Reflux.createStore({
|
||||||
listenables: ProjectActions,
|
listenables: ProjectActions,
|
||||||
onRun: function(projectName) {
|
onRun: function(projectName) {
|
||||||
@ -13,7 +12,6 @@ var Store = Reflux.createStore({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onReadAll: function(params) {
|
onReadAll: function(params) {
|
||||||
console.log('on read all in store');
|
|
||||||
var self = this;
|
var self = this;
|
||||||
resource.sync('readAll', params, function(err, projects) {
|
resource.sync('readAll', params, function(err, projects) {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
@ -6,22 +6,22 @@
|
|||||||
@import "@{libPath}/bootstrap/less/bootstrap.less";
|
@import "@{libPath}/bootstrap/less/bootstrap.less";
|
||||||
|
|
||||||
/*//flatly*/
|
/*//flatly*/
|
||||||
@import "./sources/common/variables-flatly.less";
|
@import "./common/variables-flatly.less";
|
||||||
|
|
||||||
//font-awesome
|
//font-awesome
|
||||||
@import "@{libPath}/font-awesome/less/font-awesome.less";
|
@import "@{libPath}/font-awesome/less/font-awesome.less";
|
||||||
|
|
||||||
//variables
|
//variables
|
||||||
@import "./sources/common/variables.less";
|
@import "./common/variables.less";
|
||||||
|
|
||||||
//fonts
|
//fonts
|
||||||
@import "./sources/common/fonts.less";
|
@import "./common/fonts.less";
|
||||||
|
|
||||||
//layout
|
//layout
|
||||||
@import "./sources/components/layout.less";
|
@import "./components/layout.less";
|
||||||
|
|
||||||
//components
|
//components
|
||||||
@import "./sources/components/builds.less";
|
@import "./components/builds.less";
|
||||||
@import "./sources/components/projects.less";
|
@import "./components/projects.less";
|
||||||
@import "./sources/components/terminal.less";
|
@import "./components/terminal.less";
|
||||||
|
|
31
bower.json
31
bower.json
@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "nci",
|
|
||||||
"version": "0.0.0",
|
|
||||||
"homepage": "https://github.com/okv/nci",
|
|
||||||
"authors": [],
|
|
||||||
"dependencies": {
|
|
||||||
"underscore": "1.8.2",
|
|
||||||
"moment": "2.10.6",
|
|
||||||
"react": "0.13.2",
|
|
||||||
"requirejs": "2.1.17",
|
|
||||||
"jquery": "1.10.2",
|
|
||||||
"reflux": "0.2.7",
|
|
||||||
"bootstrap": "3.3.4",
|
|
||||||
"font-awesome": "4.3.0",
|
|
||||||
"react-router": "0.13.3",
|
|
||||||
"ansi_up": "1.2.1",
|
|
||||||
"almond": "0.3.1"
|
|
||||||
},
|
|
||||||
"moduleType": [
|
|
||||||
"amd"
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"ignore": [
|
|
||||||
"**/.*",
|
|
||||||
"node_modules",
|
|
||||||
"bower_components",
|
|
||||||
"app/components/",
|
|
||||||
"test",
|
|
||||||
"tests"
|
|
||||||
]
|
|
||||||
}
|
|
42
gulpfile.js
42
gulpfile.js
@ -1,42 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
var gulp = require('gulp');
|
|
||||||
var nodemon = require('gulp-nodemon');
|
|
||||||
var less = require('gulp-less');
|
|
||||||
var gulpReactJade = require('gulp-react-jade-amd');
|
|
||||||
var mainBowerFiles = require('main-bower-files');
|
|
||||||
|
|
||||||
gulp.task('react-jade', function() {
|
|
||||||
return gulp.src('static/js/**/*.jade')
|
|
||||||
.pipe(gulpReactJade())
|
|
||||||
.pipe(gulp.dest('static/js/templates'));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('less', function () {
|
|
||||||
return gulp.src('static/css/index.less')
|
|
||||||
.pipe(less('index.css'))
|
|
||||||
.pipe(gulp.dest('./static/css'));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('fonts', function() {
|
|
||||||
return gulp.src(mainBowerFiles({filter: /.*fonts.*/i}))
|
|
||||||
.pipe(gulp.dest('static/fonts/'));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('develop', function() {
|
|
||||||
gulp.watch('static/js/app/**/*.jade', ['react-jade']);
|
|
||||||
gulp.watch('static/css/**/*.less', ['less']);
|
|
||||||
|
|
||||||
return nodemon({
|
|
||||||
ignore: ['static/**/*.js', 'app/**/*.js', 'node_modules/**', 'data/**'],
|
|
||||||
script: 'app.js',
|
|
||||||
ext: 'js'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('default', [
|
|
||||||
'react-jade',
|
|
||||||
'less',
|
|
||||||
'fonts',
|
|
||||||
'develop'
|
|
||||||
]);
|
|
21
package.json
21
package.json
@ -8,14 +8,17 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"makeTestRepos": "rm -rf test/repos/{mercurial,git}; cd test/repos/ && tar -xf mercurial.tar.gz && tar -xf git.tar.gz",
|
"makeTestRepos": "rm -rf test/repos/{mercurial,git}; cd test/repos/ && tar -xf mercurial.tar.gz && tar -xf git.tar.gz",
|
||||||
"test": "npm run makeTestRepos && mocha --bail --reporter=spec --timeout 4000",
|
"test": "npm run makeTestRepos && mocha --bail --reporter=spec --timeout 4000",
|
||||||
"watchLess": "catw -c 'lessc static/css/index.less' 'static/css/**/*.less' > static/css/index.css",
|
"build-less": "lessc app/styles/index.less > static/css/index.css",
|
||||||
"watchJs": "watchify app/app.js -t ./transforms/jade.js -o static/js/app.build.js -dv",
|
"build-js": "browserify app/app.js -t ./transforms/jade.js | uglifyjs -mc > static/js/app.build.js",
|
||||||
"dev": "npm run watchLess & npm run watchJs & nodemon app.js",
|
"watch-less": "nodemon --ext less --watch app/styles --exec 'npm run less'",
|
||||||
"sync": "npm install && npm prune && bower install && bower prune",
|
"watch-js": "watchify app/app.js -t ./transforms/jade.js -o static/js/app.build.js -dv",
|
||||||
"buildJs": "r.js -o static/js/requirejs/buid.js",
|
"watch-server": "nodemon --ignore app --ignore static --ignore node_modules --ignore data app.js",
|
||||||
"buildClean": "rm static/index.html",
|
"dev": "npm run build-fonts && npm run watch-less & npm run watch-js & npm run watch-server",
|
||||||
"buildHtml": "jade views/index.jade --obj '{\"env\": \"production\"}' -o static/",
|
"sync": "npm install && npm prune",
|
||||||
"build": "gulp less && gulp fonts && gulp react-jade && npm run buildJs && npm run buildHtml && git checkout static/js/app.build.js"
|
"build-fonts": "cp ./node_modules/bootstrap/fonts/* ./static/fonts/ & cp ./node_modules/font-awesome/fonts/* ./static/fonts/",
|
||||||
|
"build-clean": "rm static/index.html",
|
||||||
|
"build-html": "jade views/index.jade --obj '{\"env\": \"production\"}' -o static/",
|
||||||
|
"build": "npm run build-fonts && npm run build-js && npm run build-less && npm run build-html"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -67,7 +70,6 @@
|
|||||||
"underscore": "1.8.3"
|
"underscore": "1.8.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"catw": "^1.0.1",
|
|
||||||
"expect.js": "0.3.1",
|
"expect.js": "0.3.1",
|
||||||
"jade": "1.11.0",
|
"jade": "1.11.0",
|
||||||
"jshint": "^2.9.1-rc1",
|
"jshint": "^2.9.1-rc1",
|
||||||
@ -77,6 +79,7 @@
|
|||||||
"nodemon": "1.3.7",
|
"nodemon": "1.3.7",
|
||||||
"nrun": "0.1.4",
|
"nrun": "0.1.4",
|
||||||
"sinon": "1.14.1",
|
"sinon": "1.14.1",
|
||||||
|
"uglifyjs": "^2.4.10",
|
||||||
"watchify": "^3.6.1"
|
"watchify": "^3.6.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,5 +7,4 @@ html
|
|||||||
body
|
body
|
||||||
#content
|
#content
|
||||||
|
|
||||||
script
|
script(src="/js/app.build.js")
|
||||||
include ../static/js/app.build.js
|
|
||||||
|
Loading…
Reference in New Issue
Block a user