diff --git a/lib/frontexpress.js b/frontexpress.js similarity index 56% rename from lib/frontexpress.js rename to frontexpress.js index 887b08d..f978d26 100755 --- a/lib/frontexpress.js +++ b/frontexpress.js @@ -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(); diff --git a/package.json b/package.json old mode 100755 new mode 100644 index 766826a..157655e --- a/package.json +++ b/package.json @@ -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" } } diff --git a/test/application-test.js b/test/application-test.js index 4bff350..a8d2565 100755 --- a/test/application-test.js +++ b/test/application-test.js @@ -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', () => { diff --git a/test/router-test.js b/test/router-test.js index 9fba6dd..d7985d0 100755 --- a/test/router-test.js +++ b/test/router-test.js @@ -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', () => { diff --git a/webpack.config.babel.js b/webpack.config.babel.js deleted file mode 100755 index 88cc816..0000000 --- a/webpack.config.babel.js +++ /dev/null @@ -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;