Remove grunt and bower.

This commit is contained in:
Alexis Lahouze 2017-06-10 14:40:00 +02:00
parent 8b6c179c84
commit 91a77b776f
23 changed files with 0 additions and 559 deletions

View File

@ -1,3 +0,0 @@
{
"directory": "accountant-ui/bower_components"
}

View File

@ -1,19 +0,0 @@
---
# vim: set tw=80 ts=4 sw=4 sts=4:
extends: angular
rules:
indent:
- error
- 4
plugins:
- angular
- html
- security
- this
globals:
moment: true
Highcharts: true

View File

@ -1,21 +0,0 @@
{
"bitwise": true,
"browser": true,
"curly": true,
"eqeqeq": true,
"esnext": true,
"latedef": true,
"noarg": true,
"node": true,
"strict": true,
"undef": true,
"unused": true,
"quotmark": "single",
"indent": 2,
"jquery": true,
"globals": {
"angular": false,
"moment": false,
"Highcharts": false
}
}

View File

@ -1,158 +0,0 @@
// vim: set tw=80 ts=4 sw=4 sts=4:
'use strict';
module.exports = function(grunt) {
// Grunt plugin initialization.
// ============================
// Automagically load grunt tasks.
require('load-grunt-tasks')(grunt);
// Display duration for each task.
require('time-grunt')(grunt);
// Options
var options = {
// Application related configuration.
accountant: {
// Frontend related
frontend: {
// Application dependencies by bower.
app: require('./bower.json'),
// Source path
src: 'accountant-ui',
// Distribution path
dist: 'accountant-ui/dist'
}
},
// Grunt configurationi files.
config: {
src: 'grunt-config/*.js'
},
// Package description for NPM.
pkg: grunt.file.readJSON('package.json')
// banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %>\n' +
// '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %> */\n'
};
// Load configuration from Grunt configuration directory.
var configs = require('load-grunt-configs')(grunt, options);
// Initialize Grunt configuration.
grunt.initConfig(configs);
// Toolchain tasks.
// ================
// Manage dev dependencies with npm
grunt.registerTask('npm', [
// Linting on package.json.
'newer:jsonlint:package',
// NodeJS dependencies.
'shell:npmInstall'
]);
grunt.registerTask('grunt', [
// Linting on Grunt files.
'newer:eslint:grunt',
]);
// Manage toolchain
grunt.registerTask('toolchain', [
// NPM.
'npm',
// Grunt.
'grunt'
]);
// Backend tasks.
// ==============
// Manage backend dependencies with pip.
grunt.registerTask('beDeps', [
// Python dependencies. Does not work in virtualenv.
//'shell:pipInstall'
]);
// Backend linting
grunt.registerTask('beLint', [
// Use flake8 for python linting.
'newer:flake8'
]);
// Backend dev task.
grunt.registerTask('beDev', [
'beDeps',
'beLint'
]);
// Frontend tasks.
// ===============
// Front dependency management.
grunt.registerTask('feDeps', [
// Bower file linting
'newer:jsonlint:bower',
// Web assets using bower
'shell:bowerInstall',
// Inject dependencies into application.
'wiredep:app'
]);
// Generate needed files.
grunt.registerTask('feGen', [
// Generate CSS from Less.
'newer:less:frontendDev'
]);
// Linting
grunt.registerTask('feLint', [
// ECMAScript
'newer:eslint:frontend',
// CSS
'newer:lesslint:frontend',
// HTML.
'newer:htmllint'
]);
// Frontend dev task.
grunt.registerTask('feDev', [
'feDeps',
'feLint'
]);
// Global tasks.
// =============
// Dev.
grunt.registerTask('dev', [
'toolchain',
'beDev',
'feDev'
]);
// Serve application.
grunt.registerTask('serve', [
'dev',
'bgShell:runserver',
'connect:livereload',
'watch'
]);
// Make distribution.
grunt.registerTask('dist', [
'dev',
'clean:dist',
'useminPrepare',
'copy:dist',
'copy:styles',
'cssmin:generated',
'concat:generated',
'ngAnnotate',
'uglify:generated',
'filerev',
'usemin'
]);
};

View File

@ -1,67 +0,0 @@
{
"name": "accountant",
"version": "0.1.0",
"authors": [
"Alexis Lahouze <xals@lahouze.org>"
],
"license": "AGPL",
"main": [
"accountant-ui/index.html",
"accountant-ui/js/app.js"
],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "~3.1",
"moment": "~2.15",
"bootstrap": "~3.3.6",
"bootstrap-additions": "~0.3.1",
"angular": "~1.5",
"angular-resource": "~1.5",
"angular-route": "~1.5",
"angular-messages": "~1.5",
"angular-strap": "~2.3.6",
"angular-xeditable": "~0.4",
"angular-ui-notification": "~0.2",
"highcharts-ng": "~0.0.11",
"highstock-release": "~5.0",
"angular-http-auth": "~1.3",
"meanie-angular-storage": "~1.3",
"font-awesome": ">=4.5.0",
"bootbox": "~4.4.0",
"angular-bootstrap": "~2.1",
"ngBootbox": "^0.1.3"
},
"overrides": {
"bootstrap": {
"main": [
"less/bootstrap.less",
"dist/css/bootstrap.css",
"dist/js/bootstrap.js"
]
},
"font-awesome": {
"main": [
"./css/font-awesome.css",
"./fonts/*"
]
},
"meanie-angular-storage": {
"main": [
"release/meanie-angular-storage.js"
]
},
"highstock-release": {
"main": [
"highstock.js",
"highcharts-more.js",
"modules/exporting.js"
]
}
}
}

View File

@ -1,16 +0,0 @@
var extend = require('util')._extend;
module.exports = {
runserver: {
cmd: 'flask run',
execOpts: {
cwd: '.',
env: extend(process.env, {
FLASK_APP: 'accountant/__init__.py',
FLASK_DEBUG: '1'
})
},
fail: true,
bg: true
}
};

View File

@ -1,7 +0,0 @@
'use strict';
module.exports = {
dist: [
'<%= accountant.frontend.dist %>'
]
};

View File

@ -1,40 +0,0 @@
'use strict';
module.exports = {
options: {
port: 5001,
hostname: 'localhost',
base: '<%= accountant.frontend.src %>',
apiUrl: 'http://localhost:5000/api/',
swaggerUiUrl: 'http://localhost:5000/swaggerui/',
livereload: 1337
},
proxies: [{
context: '/api',
host: '127.0.0.1',
port: 5000,
https: false
}, {
contect: '/swaggerui',
host: '127.0.0.1',
port: 5000,
https: false
}],
livereload: {
options: {
// open: true,
middleware: function(connect, options, middlewares) {
var connectLogger = require('connect-logger');
var connectProxy = require('connect-proxy-layer');
var apiProxy = connectProxy(options.apiUrl);
var swaggerUiProxy = connectProxy(options.swaggerUiUrl);
return [
connectLogger(),
connect().use('/api', apiProxy),
connect().use('/swaggerUi', swaggerUiProxy)
].concat(middlewares);
}
}
}
};

View File

@ -1,22 +0,0 @@
'use strict';
module.exports = {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= accountant.frontend.src %>',
dest: '<%= accountant.frontend.dist %>',
src: [
'*.html',
'views/*.html'
]
}]
},
styles: {
expand: true,
cwd: '<%= accountant.frontend.src %>/css',
dest: '.tmp/css',
src: '{,*/}*.css'
}
};

View File

@ -1,13 +0,0 @@
'use strict';
module.exports = {
grunt: [
'Gruntfile.js',
'grunt-config/*.js'
],
frontend: [
'<%= accountant.frontend.src %>/index.html',
'<%= accountant.frontend.src %>/views/*.html',
'<%= accountant.frontend.src %>/js/*.js'
]
};

View File

@ -1,17 +0,0 @@
'use strict';
module.exports = {
options: {
encoding: 'utf-8',
algorithm: 'md5',
length: 8
},
dist: {
src: [
'<%= accountant.frontend.dist %>/css/*.css',
'<%= accountant.frontend.dist %>/js/*.js',
'!<%= accountant.frontend.dist %>/css/*.map.css',
'!<%= accountant.frontend.dist %>/js/*.map.js'
]
}
};

View File

@ -1,10 +0,0 @@
'use strict';
module.exports = {
options: {
maxComplexity: 4
},
src: [
'accountant/**/*.py'
]
};

View File

@ -1,16 +0,0 @@
module.exports = {
frontend: {
options: {
'attr-name-style': 'dash',
'attr-req-value': false,
'id-class-ignore-regex': '{{.*?}}',
'id-class-style': 'dash',
'indent-style': 'spaces',
'indent-width': 2
},
src: [
'<%= accountant.frontend.src %>/*.html',
'<%= accountant.frontend.src %>/views/*.html'
]
}
};

View File

@ -1,13 +0,0 @@
'use strict';
module.exports = {
options: {
basePath: '<%= accountant.frontend.src %>',
baseUrl: ''
},
index: {
files: {
'<%= accountant.frontend.src %>/index.html': '<%= accountant.frontend.src %>/index.html'
}
}
};

View File

@ -1,20 +0,0 @@
'use strict';
module.exports = {
package: {
src: ['package.json'],
options: {
formatter: 'prose',
reporter: 'jslint',
indent: 2
}
},
bower: {
src: ['bower.json'],
options: {
formatter: 'prose',
reporter: 'jslint',
indent: 2
}
}
};

View File

@ -1,12 +0,0 @@
'use strict';
module.exports = {
frontendDev: {
options: {
paths: ['<%= accountant.frontend.src %>/less']
},
files: {
'<%= accountant.frontend.src %>/css/main.css': '<%= accountant.frontend.src %>/less/main.less'
}
}
};

View File

@ -1,7 +0,0 @@
'use strict';
module.exports = {
frontend: {
src: ['<%= accountant.frontend.src %>/less/{,**/}*.less']
}
};

View File

@ -1,12 +0,0 @@
'use strict';
module.exports = {
dist: {
files: [{
expand: true,
cwd: '.tmp/concat/js',
src: '*.js',
dest: '.tmp/concat/js'
}]
}
};

View File

@ -1,11 +0,0 @@
module.exports = {
npmInstall: {
command: 'npm install'
},
bowerInstall: {
command: 'bower install'
},
pipInstall: {
command: 'pip install --upgrade --requirement requirements.txt'
}
};

View File

@ -1,16 +0,0 @@
'use strict';
module.exports = {
html: ['<%= accountant.frontend.dist %>/{,*/}*.html'],
css: ['<%= accountant.frontend.dist %>/css/{,*/}*.css'],
js: ['<%= accountant.frontend.dist %>/js/{,*/}*.js'],
options: {
assetsDir: [
'<%= accountant.frontend.dist %>',
'<%= accountant.frontend.dist %>/css'
],
patterns: {
js: [[/(images\/[^''""]*\.(png|jpg|jpeg|gif|webp|svg))/g, 'Replacing references to images']]
}
}
};

View File

@ -1,17 +0,0 @@
'use strict';
module.exports = {
html: '<%= accountant.frontend.src %>/index.html ',
options: {
dest: '<%= accountant.frontend.dist %>',
flow: {
html: {
steps: {
js: ['concat', 'uglify'],
css: ['cssmin']
},
post: {}
}
}
}
};

View File

@ -1,36 +0,0 @@
'use strict';
module.exports = {
// Toolchain
npm: {
files: ['package.json'],
tasks: ['npm']
},
grunt: {
files: ['Gruntfile.js', 'grunt-config/*.js'],
tasks: ['grunt']
},
// Backend
requirements: {
files: ['requirements.txt'],
tasks: ['beDeps']
},
be: {
files: 'accountant/{,**}/*.py',
tasks: ['beLint', 'bgShell:runserver']
},
// Frontend
bower: {
files: 'bower.json',
tasks: ['feDeps']
},
fe: {
options: {
livereload: '<%= connect.options.livereload %>'
},
files: [
'<%= accountant.frontend.src %>/{,**}/*',
],
tasks: ['feLint']
}
};

View File

@ -1,6 +0,0 @@
module.exports = {
app: {
src: ['<%= accountant.frontend.src %>/index.html'],
ignorePath: /\.\.\//
}
};