Skip to content

Commit

Permalink
Improve folder structure, remove unneded code
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Dzialocha committed Dec 1, 2017
1 parent be19d91 commit 0808933
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ node_modules

# build
dist

# docs
static
2 changes: 1 addition & 1 deletion docs/assets/styles/base/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ body {
font-size: $font-size-regular;
font-family: $font-family-regular;

line-height: 1.5;
line-height: $line-height-regular;
}
2 changes: 2 additions & 0 deletions docs/assets/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ $font-weight-regular: 400;
$font-weight-heavy: 700;

$font-size-regular: 18px;

$line-height-regular: 1.5;
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
"npm": "~5.5.1"
},
"scripts": {
"build": "npm run clean:dist && cross-env NODE_ENV=production webpack",
"clean": "npm run clean:dist && npm run clean:docs && npm run clean:node",
"clean:dist": "rimraf dist/",
"clean:docs": "rimraf static/",
"build": "npm run build:docs && npm run build:play",
"build:docs": "make-dir ./dist && static-generator build --source_dir ./docs --output_dir ./dist",
"build:play": "npm run clean:play && cross-env NODE_ENV=production webpack",
"clean": "npm run clean:dist && npm run clean:node",
"clean:dist": "rimraf dist",
"clean:node": "rimraf node_modules/",
"docs": "make-dir ./static && static-generator build --source_dir ./docs --output_dir ./static",
"clean:play": "rimraf dist/play",
"lint": "npm run lint:js && npm run lint:scss",
"lint:js": "eslint automaton/scripts; exit 0",
"lint:scss": "sass-lint -c .sass-lint.yml '{automaton,docs}/**/*.scss' -v -q",
"postinstall": "npm run build && npm run docs",
"postinstall": "npm run build",
"serve": "webpack-dev-server --host 0.0.0.0",
"start": "node server/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
3 changes: 1 addition & 2 deletions server/httpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ class HTTPServer {
this.app = express()

this.app.use(cors({ origin: '*' }))
this.app.use(express.static(path.join(__dirname, '..', 'static')))
this.app.use('/play', express.static(path.join(__dirname, '..', 'dist')))
this.app.use(express.static(path.join(__dirname, '..', 'dist')))

this.server = http.createServer(this.app)
}
Expand Down
4 changes: 1 addition & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const path = require('path')
const webpack = require('webpack')

const pkg = require('./package.json')

const SERVER_PORT = 9000
const DIST_FOLDER = 'dist'
const SRC_FOLDER = 'automaton'
Expand Down Expand Up @@ -77,7 +75,7 @@ module.exports = {
[VENDOR_FOLDER_NAME]: APP_DEPENDENCIES,
},
output: {
path: getPath(`./${DIST_FOLDER}`),
path: getPath(`./${DIST_FOLDER}/play`),
filename: '[name].js',
},
module: {
Expand Down

0 comments on commit 0808933

Please sign in to comment.