Skip to content

Commit

Permalink
remove gulp and a lot of unused npm libs, compilation is much cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
dav-m85 committed Sep 20, 2017
1 parent 415b9c2 commit 31c9d15
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 67 deletions.
13 changes: 5 additions & 8 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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 !
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 13 additions & 1 deletion app.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
2 changes: 2 additions & 0 deletions client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
83 changes: 40 additions & 43 deletions less/base.less
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
19 changes: 7 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
}
}
3 changes: 1 addition & 2 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

if (preg_match('/\.(?:png|jpg|jpeg|gif|js|css)$/', $_SERVER["REQUEST_URI"])) {
return false; // retourne la requête telle quelle.
return false; // return the request as is
}

require_once __DIR__.'/../vendor/autoload.php';
Expand All @@ -15,7 +15,6 @@
<html>
<head>
<title>Silo</title>
<link href="base.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="ReactMount"></div>
Expand Down

0 comments on commit 31c9d15

Please sign in to comment.