mirror of
https://gitlab.silvrtree.co.uk/martind2000/frontexpress.git
synced 2025-01-11 05:55:07 +00:00
removed webpack
This commit is contained in:
parent
a0b1ecd583
commit
918aa3ac30
@ -1,6 +1,6 @@
|
||||
import Application from './application';
|
||||
import Router from './router';
|
||||
import Middleware from './middleware';
|
||||
import Application from './lib/application';
|
||||
import Router from './lib/router';
|
||||
import Middleware from './lib/middleware';
|
||||
|
||||
function frontexpress() {
|
||||
return new Application();
|
16
package.json
Executable file → Normal file
16
package.json
Executable file → Normal file
@ -2,10 +2,8 @@
|
||||
"name": "frontexpress",
|
||||
"version": "1.0.0",
|
||||
"description": "Minimalist front end router framework a la express",
|
||||
"main": "dist/frontexpress.js",
|
||||
"main": "frontexpress.js",
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"dev": "webpack-dev-server index.js --watch",
|
||||
"only-test": "mocha --compilers js:babel-core/register",
|
||||
"test": "babel-node node_modules/.bin/babel-istanbul cover node_modules/.bin/_mocha"
|
||||
},
|
||||
@ -26,13 +24,11 @@
|
||||
"frontexpress"
|
||||
],
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.9.0",
|
||||
"babel-core": "^6.9.0",
|
||||
"babel-eslint": "^6.0.4",
|
||||
"babel-cli": "^6.10.1",
|
||||
"babel-core": "^6.10.4",
|
||||
"babel-eslint": "^6.1.0",
|
||||
"babel-istanbul": "^0.8.0",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-preset-es2015": "^6.9.0",
|
||||
"babel-register": "^6.9.0",
|
||||
"chai": "^3.5.0",
|
||||
"eslint": "^2.11.0",
|
||||
"eslint-loader": "^1.3.0",
|
||||
@ -42,8 +38,6 @@
|
||||
"mocha": "^2.5.3",
|
||||
"mocha-jsdom": "^1.1.0",
|
||||
"rewire": "^2.5.1",
|
||||
"sinon": "^1.17.4",
|
||||
"webpack": "^1.13.1",
|
||||
"webpack-dev-server": "^1.14.1"
|
||||
"sinon": "^1.17.4"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*eslint-env mocha*/
|
||||
import {assert} from 'chai';
|
||||
import sinon from 'sinon';
|
||||
import frontexpress from '../lib/frontexpress';
|
||||
import frontexpress from '../frontexpress';
|
||||
import Requester from '../lib/requester';
|
||||
|
||||
describe('Application', () => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*eslint-env mocha*/
|
||||
import {assert} from 'chai';
|
||||
import sinon from 'sinon';
|
||||
import frontexpress from '../lib/frontexpress';
|
||||
import frontexpress from '../frontexpress';
|
||||
import {HTTP_METHODS} from '../lib/requester';
|
||||
|
||||
describe('Router', () => {
|
||||
|
@ -1,44 +0,0 @@
|
||||
import webpack from 'webpack';
|
||||
|
||||
const cmd = (arr) => { return process.argv.indexOf(arr) > -1; }
|
||||
const production = cmd('-p') || cmd('--optimize-minimize');
|
||||
const debug = cmd('-d') || cmd('--debug');
|
||||
|
||||
const options = {
|
||||
uglifyjs: undefined
|
||||
};
|
||||
|
||||
const webpackConfig = {
|
||||
entry: "./lib/frontexpress.js",
|
||||
output: {
|
||||
path: __dirname,
|
||||
filename: 'dist/frontexpress.js'
|
||||
},
|
||||
devtool: 'inline-source-map',
|
||||
module: {
|
||||
preLoaders: [
|
||||
// Javascript
|
||||
{ test: /\.js$/, loader: 'eslint', exclude: /node_modules/ }
|
||||
],
|
||||
loaders: [
|
||||
{ test: /lib\/.+\.js$/, loader: 'babel', query: { presets: ['es2015'] } },
|
||||
{ test: /\.css$/, loader: 'style!css' }
|
||||
]
|
||||
},
|
||||
eslint: {
|
||||
failOnWarning: false,
|
||||
failOnError: true
|
||||
},
|
||||
plugins: []
|
||||
};
|
||||
|
||||
if (production) {
|
||||
webpackConfig.plugins.push(
|
||||
// Prevents the inclusion of duplicate code
|
||||
new webpack.optimize.DedupePlugin(),
|
||||
// Add UglifyJs options to the compiler
|
||||
new webpack.optimize.UglifyJsPlugin(options.uglifyjs)
|
||||
);
|
||||
}
|
||||
|
||||
export default webpackConfig;
|
Loading…
Reference in New Issue
Block a user