Permalink
Browse files

build: refactor tasks and config (#68)

  • Loading branch information...
Burak Tasci
Burak Tasci committed Sep 9, 2017
1 parent a661d29 commit c3c41cbc066df0635d1240c85f8dd695f3cf860c

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1,32 +1,45 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
*.js
public/
.server/*
/public
/.server
!.server/spa-server*.js
.cache/
.temp/
*.d.ts
*.metadata.json
/.cache
/.temp

# dependencies
node_modules/
yarn.lock

# IDEs and editors
.idea/
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# build tools
coverage/
!gulpfile.js
!karma.conf.js
!postcss.config.js
!protractor.conf.js
!stylelint.config.js
!webpack.config.js
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
!config/*.js
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
!src/client/custom-typings.d.ts
testem.log
/typings
yarn-error.log

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
@@ -3,8 +3,8 @@
/**
* Server helpers & dependencies
*/
const $$ = require('../config/helpers');
const settings = $$.loadSettings(require('../config/build-config.json'));
const $$ = require('../tools/build/helpers');
const settings = $$.loadSettings(require('../tools/build/build-config.json'));

const express = require('express');
const compression = require('compression');
@@ -14,7 +14,7 @@ const path = require('path');
const webpack = require('webpack');
const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const webpackConfig = require($$.root('./config/webpack.config'));
const webpackConfig = require($$.root('./tools/build/webpack.config'));

const server = express();
server.use(compression());

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1 +1 @@
module.exports = require('./config/gulp-tasks.js');
module.exports = require('./tools/build/gulp-tasks.js');

This file was deleted.

Oops, something went wrong.
@@ -1,6 +1,6 @@
{
"name": "@ng-seed/universal",
"version": "0.4.0-beta.3",
"version": "1.0.0",
"description": "Seed project for Angular Universal apps featuring Server-Side Rendering (SSR), Webpack, dev/prod modes, DLLs, AoT compilation, HMR, SCSS compilation, lazy loading, config, cache, i18n, SEO, and TSLint/codelyzer",
"repository": {
"type": "git",
@@ -16,15 +16,21 @@
},
"homepage": "https://github.com/ng-seed/universal#readme",
"scripts": {
"build:spa-dev": "gulp clean && gulp build:spa-dev",
"build:spa-prod": "gulp clean && gulp build:spa-prod",
"build:universal-dev": "gulp clean && gulp build:universal-dev",
"build:universal-prod": "gulp clean && gulp build:universal-prod",
"clean": "gulp clean --color",
"build:spa-dev": "gulp build:spa-dev --color",
"build:spa-prod": "gulp build:spa-prod --color",
"build:universal-dev": "gulp build:universal-dev --color",
"build:universal-prod": "gulp build:universal-prod --color",
"lint": "tslint -p ./tslint.json --force",
"rebuild:spa-dev": "npm run clean && npm run build:spa-dev",
"rebuild:spa-prod": "npm run clean && npm run build:spa-prod",
"rebuild:universal-dev": "npm run clean && npm run build:universal-dev",
"rebuild:universal-prod": "npm run clean && npm run build:universal-prod",
"serve": "npm run serve:universal",
"serve:spa": "nodemon ./.server/spa-server.js",
"serve:spa-hmr": "node ./.server/spa-server.hmr.js",
"serve:universal": "nodemon ./.server/server.js",
"test": "karma start"
"test": "gulp test --color"
},
"dependencies": {
"express": "~4.15.4",
@@ -87,7 +93,7 @@
"gulp-tslint": "~8.1.2",
"gulp-replace": "~0.6.1",
"webpack": "~3.5.6",
"angular-webpack-config": "~1.1.0",
"angular-webpack-config": "~1.2.0",
"uglify-js": "git://github.com/mishoo/UglifyJS2#harmony-v2.8.22",
"webpack-merge": "~4.1.0",
"webpack-hot-middleware": "~2.19.1",
@@ -138,14 +144,14 @@
"karma-sourcemap-loader": "~0.3.7",
"karma-webpack": "~2.0.4",
"karma-chrome-launcher": "~2.2.0",
"tslib": "~1.7.1",

"source-map-loader": "~0.2.1",
"istanbul-instrumenter-loader": "~3.0.0",

"codelyzer": "~3.1.2",
"tslint": "~5.7.0",
"angular-tslint-rules": "~1.0.4",
"tslib": "~1.7.1",
"typescript": "~2.5.2"
},
"greenkeeper": {
@@ -1 +1 @@
module.exports = require('./config/postcss.config.js');
module.exports = require('./tools/config/postcss.config.js');

This file was deleted.

Oops, something went wrong.
@@ -26,8 +26,8 @@ import { ChangeLanguageComponent } from './change-language.component';

// for AoT compilation
export function configFactory(platformId: any, http: Http): ConfigLoader {
const serverLoader = new ConfigFsLoader('./public/assets/config.json');
const browserLoader = new ConfigHttpLoader(http, './assets/config.json');
const serverLoader = new ConfigFsLoader('./public/assets/config.local.json');
const browserLoader = new ConfigHttpLoader(http, './assets/config.local.json');

return new UniversalConfigLoader(platformId, serverLoader, browserLoader);
}
@@ -27,7 +27,6 @@
"culture": "tr-TR"
}
],
"autoDetectLanguage": true,
"useLocalizedRoutes": true
},
"routes": {
@@ -1 +1 @@
module.exports = require('./config/stylelint.config');
module.exports = require('./tools/config/stylelint.config');
@@ -8,7 +8,6 @@
},
"root": ".",
"paths": {
"config": "{{root}}/config",
"src": {
"root": "{{root}}/src",
"client": {
@@ -26,6 +25,12 @@
"app": "{{src_server_root}}/app"
}
},
"tools" : {
"root": "{{root}}/tools",
"build": "{{tools_root}}/build",
"config": "{{tools_root}}/config",
"test": "{{tools_root}}/test"
},
"public": {
"root": "{{root}}/public",
"assets": {
Oops, something went wrong.

0 comments on commit c3c41cb

Please sign in to comment.