diff --git a/.babelrc b/.babelrc index 5266da6..90ea52b 100644 --- a/.babelrc +++ b/.babelrc @@ -3,16 +3,13 @@ */ { "presets":[ - "react" + "react", "env" ], "plugins": [ - ["transform-es2015-modules-commonjs", { - "strict": true - }], - "transform-es2015-block-scoping", // const and let - "transform-es2015-arrow-functions", // ()=>{} - "babel-plugin-transform-es2015-destructuring", - "babel-plugin-transform-es2015-spread", + + + + "babel-plugin-transform-object-rest-spread" // spreads ! ] } \ No newline at end of file diff --git a/README.md b/README.md index 3ab1497..fb07963 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Proudly built in Montréal with: ## Testing Silo uses Behat for testing. Run it with: - php bin/behat + make test ## TODO - import/export data page (backup) diff --git a/app.webpack.config.js b/app.webpack.config.js index 1368874..b697626 100644 --- a/app.webpack.config.js +++ b/app.webpack.config.js @@ -18,7 +18,19 @@ module.exports = { include: [ relativePath("client") ] - } + }, + { + test: /\.less$/, + use: ['style-loader', 'css-loader', 'less-loader'], + }, + // @todo Meh this part is not working for some reason :/ + { + test: /\.(ttf|eot|woff|woff2)$/, + loader: 'file-loader', + options: { + name: 'fonts/[name].[ext]', + }, + }, ] }, plugins: [ diff --git a/client/main.js b/client/main.js index 64334ed..c084f31 100644 --- a/client/main.js +++ b/client/main.js @@ -9,6 +9,8 @@ const Sidebar = require('./Hud/Sidebar'); const Factory = require('./Factory'); const ModifierFactory = require('./Common/ModifierFactory'); +require('../less/base.less'); + const App = React.createClass({ getInitialState: () => ({ currentRoute: 'home', diff --git a/less/base.less b/less/base.less index 8a65b72..b26ef66 100644 --- a/less/base.less +++ b/less/base.less @@ -1,62 +1,59 @@ -@nodeModules: '../node_modules'; -@bootstrap: '@{nodeModules}/bootstrap/less'; - /** * Copy from bootstrap v3.3.7 root file */ // Core variables and mixins @import "variables.less"; -@import "@{bootstrap}/mixins.less"; +@import "~bootstrap/less/mixins.less"; // Reset and dependencies -@import "@{bootstrap}/normalize.less"; -@import "@{bootstrap}/print.less"; -@import "@{bootstrap}/glyphicons.less"; +@import "~bootstrap/less/normalize.less"; +@import "~bootstrap/less/print.less"; +//@import "~bootstrap/less/glyphicons.less"; // Core CSS -@import "@{bootstrap}/scaffolding.less"; -@import "@{bootstrap}/type.less"; -@import "@{bootstrap}/code.less"; -@import "@{bootstrap}/grid.less"; -@import "@{bootstrap}/tables.less"; -@import "@{bootstrap}/forms.less"; -@import "@{bootstrap}/buttons.less"; +@import "~bootstrap/less/scaffolding.less"; +@import "~bootstrap/less/type.less"; +@import "~bootstrap/less/code.less"; +@import "~bootstrap/less/grid.less"; +@import "~bootstrap/less/tables.less"; +@import "~bootstrap/less/forms.less"; +@import "~bootstrap/less/buttons.less"; // Components -@import "@{bootstrap}/component-animations.less"; -@import "@{bootstrap}/dropdowns.less"; -@import "@{bootstrap}/button-groups.less"; -@import "@{bootstrap}/input-groups.less"; -@import "@{bootstrap}/navs.less"; -@import "@{bootstrap}/navbar.less"; -@import "@{bootstrap}/breadcrumbs.less"; -@import "@{bootstrap}/pagination.less"; -@import "@{bootstrap}/pager.less"; -@import "@{bootstrap}/labels.less"; -@import "@{bootstrap}/badges.less"; -@import "@{bootstrap}/jumbotron.less"; -@import "@{bootstrap}/thumbnails.less"; -@import "@{bootstrap}/alerts.less"; -@import "@{bootstrap}/progress-bars.less"; -@import "@{bootstrap}/media.less"; -@import "@{bootstrap}/list-group.less"; -@import "@{bootstrap}/panels.less"; -@import "@{bootstrap}/responsive-embed.less"; -@import "@{bootstrap}/wells.less"; -@import "@{bootstrap}/close.less"; +@import "~bootstrap/less/component-animations.less"; +@import "~bootstrap/less/dropdowns.less"; +@import "~bootstrap/less/button-groups.less"; +@import "~bootstrap/less/input-groups.less"; +@import "~bootstrap/less/navs.less"; +@import "~bootstrap/less/navbar.less"; +@import "~bootstrap/less/breadcrumbs.less"; +@import "~bootstrap/less/pagination.less"; +@import "~bootstrap/less/pager.less"; +@import "~bootstrap/less/labels.less"; +@import "~bootstrap/less/badges.less"; +@import "~bootstrap/less/jumbotron.less"; +@import "~bootstrap/less/thumbnails.less"; +@import "~bootstrap/less/alerts.less"; +@import "~bootstrap/less/progress-bars.less"; +@import "~bootstrap/less/media.less"; +@import "~bootstrap/less/list-group.less"; +@import "~bootstrap/less/panels.less"; +@import "~bootstrap/less/responsive-embed.less"; +@import "~bootstrap/less/wells.less"; +@import "~bootstrap/less/close.less"; // Components w/ JavaScript -@import "@{bootstrap}/modals.less"; -@import "@{bootstrap}/tooltip.less"; -@import "@{bootstrap}/popovers.less"; -@import "@{bootstrap}/carousel.less"; +@import "~bootstrap/less/modals.less"; +@import "~bootstrap/less/tooltip.less"; +@import "~bootstrap/less/popovers.less"; +@import "~bootstrap/less/carousel.less"; // Utility classes -@import "@{bootstrap}/utilities.less"; -@import "@{bootstrap}/responsive-utilities.less"; +@import "~bootstrap/less/utilities.less"; +@import "~bootstrap/less/responsive-utilities.less"; -@import (less) "@{nodeModules}/fixed-data-table/dist/fixed-data-table.css"; -@import (less) "@{nodeModules}/react-bootstrap-switch/dist/css/bootstrap2/react-bootstrap-switch.css"; +@import (less) "~fixed-data-table/dist/fixed-data-table.css"; +@import (less) "~react-bootstrap-switch/dist/css/bootstrap2/react-bootstrap-switch.css"; @import "./panel.less"; @import "./daterangepicker.less"; diff --git a/package.json b/package.json index 7f0ad33..428d695 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "author": "", + "author": "David Moreau", "main": "client/silo.js", "dependencies": { "ampersand-router": "^4.0.0", @@ -26,20 +26,15 @@ "superagent": "^3.5.2" }, "devDependencies": { + "babel-core": "^6.26.0", "babel-loader": "^7.0.0", - "babel-plugin-transform-es2015-arrow-functions": "v6.22.0", - "babel-plugin-transform-es2015-block-scoping": "v6.23.0", - "babel-plugin-transform-es2015-destructuring": "^6.23.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", - "babel-plugin-transform-es2015-spread": "^6.22.0", "babel-plugin-transform-object-rest-spread": "^6.23.0", - "babel-preset-es2015": "^6.18.0", + "babel-preset-env": "^1.6.0", "babel-preset-react": "^6.16.0", - "babelify": "^7.3.0", - "browserify": "~10.2.4", - "gulp": "^3.9.1", - "gulp-less": "^3.3.0", - "vinyl-source-stream": "^1.1.0", + "css-loader": "^0.28.7", + "less": "^2.7.2", + "less-loader": "^4.0.5", + "style-loader": "^0.18.2", "webpack": "^2.6.1" } } diff --git a/public/index.php b/public/index.php index 78ac2f1..95753a3 100644 --- a/public/index.php +++ b/public/index.php @@ -1,7 +1,7 @@ Silo -