Skip to content

Commit

Permalink
Merge pull request #89 from kittn/develop
Browse files Browse the repository at this point in the history
Release the (Webpack)-Kraken!
  • Loading branch information
Lars authored Aug 24, 2017
2 parents 24db165 + f3c029f commit a69f4a6
Show file tree
Hide file tree
Showing 53 changed files with 567 additions and 962 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ Further steps in the documentation.

## Dependencies

- Node >= 7.6
- Node >= 8
- Gulp 3.9.1
- Yeoman 2.0.0
- Git CLI
- Wget
- WP CLI
- [WP CLI](http://wp-cli.org/de/)
- mysql CLI

## Special Thanks to
Expand Down
30 changes: 16 additions & 14 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const clear = require('clear-terminal')
const random = require('randomstring')
const commandExists = require('command-exists')
const os = require('os')
const gradient = require('gradient-string')

// Importing modules
const promptsFunction = require('./modules/prompt')
Expand Down Expand Up @@ -92,18 +93,16 @@ module.exports = class extends Generator {
}

prompting () {
// Custom Greeting
var welcome = chalk`
{cyan
{hex('#0097ef') ..}
{hex('#0097ef') .l0O:}
{hex('#0097ef') :NMMO' .od'}
{hex('#0097ef') ,0WNd. :XNl}
........ {hex('#0097ef') .l:. .,'. ,,.}
'kXXXXXX0; {hex('#0097ef') lNO' 'lxxxol:,.}
,KMMMMMMN: {hex('#0097ef') .,''dXMMMMMMMNd.} .dOOOOOOk, :kOOOOOOo.
,KMMMMMMN: {hex('#0097ef') 'OWMMMMWX0xc'} ,KMMMMMMNc oWMMMMMMO.
,KMMMMMMN: {hex('#0097ef') 'dkxol:,.. } ,KMMMMMMNc oWMMMMMMO.
var welcomeHead = gradient.atlas(`
..
.l0O:
:NMMO' .od'
,0WNd. :XNl
........ .l:. .,'. ,,.
'kXXXXXX0; lNO' 'lxxxol:,.
,KMMMMMMN: .,''dXMMMMMMMNd. .dOOOOOOk, :kOOOOOOo.
,KMMMMMMN: 'OWMMMMWX0xc' ,KMMMMMMNc oWMMMMMMO.
,KMMMMMMN: 'dkxol:,.. ,KMMMMMMNc oWMMMMMMO.
,KMMMMMMN: ,KMMMMMMNc oWMMMMMMO.
,KMMMMMMN: ';::::::::' .,;;;;;;,. .;;dXMMMMMMWk:;;;;;;;;;:OWMMMMMMKo;;;;;;. .,;;;;;;,. ..;cloolc;.
,KMMMMMMN: 'dXMMMMMMMNx' ,KMMMMMWX;.dWWMMMMMMMMMMMWWWWWWWWWWMMMMMMMMMMMMWMMX: ;XMMMMMMKc,oOXWMMMMMMWXOl.
Expand All @@ -121,7 +120,10 @@ module.exports = class extends Generator {
,KMMMMMMN: ;0WMMMMMMWk' ,KMMMMMMX: .dNMMMMMMMMMMMMMMWk. ;0WMMMMMMMMMMMMMXlcXMMMMMMK; :XMMMMMMK,
,KMMMMMMN: .xWMMMMMMW0; ,KMMMMMMX: .:ONMMMMMMMMMMMWXd. .oKWMMMMMMMMMMN0clXMMMMMMK, :XMMMMMMK,
.dOOOOOOx, .ckOOOOOOkd' .dOOkkOOx' .,lxOKKXKK0ko:. .:ok0KKKKOxl,. 'xOOOOOOd. 'xOOOOOOd.
...... .... }
`)

// Custom Greeting
var welcome = chalk`
{white.bold.bgCyan v${this.pkg.version} }{hex('#c9c9c9')
------------------------------------------- {hex('#00ffd8') the revenge of the kittn } ---------------------------------------------
Expand All @@ -131,6 +133,7 @@ module.exports = class extends Generator {
`
clear()
this.log(welcomeHead)
this.log(welcome)

// Now ask some questions already
Expand Down Expand Up @@ -287,7 +290,6 @@ module.exports = class extends Generator {
{hex('#94ff00').bold Happy Coding.}`


this.log(goodbye)
}
}
58 changes: 31 additions & 27 deletions generators/app/modules/config/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,37 +88,41 @@ function addBaseCofig (files = {}, context) {
}
}
},
'src': {
'baseconf': {
'type': context.props.projectusage,
'methodology': context.props.projectcssstructure ? context.props.projectcssstructure : 'sassITCSS',
'structure': context.props.projectstructure ? context.props.projectstructure : 'uncompiled',
src: {
baseconf: {
type: context.props.projectusage,
methodology: context.props.projectcssstructure ? context.props.projectcssstructure : 'sassITCSS',
structure: context.props.projectstructure ? context.props.projectstructure : 'uncompiled',
'themeColor': context.props.projectthemecolor
},
'style': 'src/style/',
'template': 'src/template/',
'js': 'src/js/',
'bower': 'src/bower/',
'scripts': 'src/scripts',
'structure': 'src/structure/',
'fonts': 'src/fonts/',
'images': {
'bitmapSprite': {
'files': 'src/images/bitmapSprite-assets/',
'name': 'sprite.png'
base: 'src/',
style: 'src/style/',
template: 'src/template/',
js: 'src/js/',
scripts: 'src/scripts',
structure: 'src/structure/',
fonts: 'src/fonts/',
images: {
bitmapSprite: {
files: 'src/images/bitmapSprite-assets/',
name: 'sprite.png'
},
'vectorSprite': {
'files': 'src/images/vectorSprite-assets/',
'name': 'vector-sprite.svg',
'symbolName': 'symbol-sprite.svg',
'maxHeight': 30,
'maxWidth': 30,
'padding': 0
vectorSprite: {
files: 'src/images/vectorSprite-assets/',
name: 'vector-sprite.svg',
symbolName: 'symbol-sprite.svg',
maxHeight: 30,
maxWidth: 30,
padding: 0
},
'bitmaps': 'src/images/bitmapSingle-assets/',
'vectors': 'src/images/vectorSingle-assets/'
bitmaps: 'src/images/bitmapSingle-assets/',
vectors: 'src/images/vectorSingle-assets/'
},
'contentimage': 'src/images/htmlimages/',
'system': 'src/.system/'
contentimage: 'src/images/htmlimages/',
system: 'src/.system/',
jsEntryPoints: {
main: '../src/js/main.js'
}
}
})

Expand Down
7 changes: 4 additions & 3 deletions generators/app/modules/package/dependencies/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ function addBaseDependencies (files = {}, context) {
scripts: {
'subtask:buildgulp': 'gulp build --env=production',
'assets': 'gulp copy:assets --env=init',
'build': 'cross-env NODE_ENV=production npm run subtask:bundlewebpack && cross-env NODE_ENV=production npm run subtask:buildgulp',
'build': 'cross-env NODE_ENV=production npm run subtask:buildgulp && cross-env NODE_ENV=production npm run subtask:bundlewebpack',
'deploy': 'npm run build',
'dev': 'cross-env NODE_ENV=development gulp',
'favicon': 'gulp build:favicon --env=init',
'htmlassets': 'gulp copy:contentimages --env=init',
'init': 'gulp init --env=init && npm run subtask:bundlewebpack',
'init': 'cross-env NODE_ENV=production gulp init --env=init && cross-env NODE_ENV=production npm run subtask:bundlewebpack',
'template': 'gulp compiler:html --env=init',
'uiimages': 'gulp rebuild:images --env=init'
'uiimages': 'gulp rebuild:images --env=init',
'fonts': 'gulp copy:fonts --env=init'
},
devDependencies: {
'ansi-html': '^0.0.7',
Expand Down
23 changes: 17 additions & 6 deletions generators/app/modules/package/dependencies/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ const extend = require('deep-extend')
function addScriptDependencies (files = {}, context) {
extend(files.pkg, {
scripts: {
'subtask:bundlewebpack': 'webpack --config webpack.config.babel.js -p --colors --env.bundle=production --env=production',
'subtask:bundlewebpack': 'webpack --config=webpack/webpack.config.babel.js -p --colors --env.bundle=production --env=production',
'scripts': 'gulp rebuild:js --env=init',
'webpack:analyze': 'webpack-bundle-analyzer stats.json dist/assets/'
'webpack:analyze': 'webpack-bundle-analyzer webpack/stats.json dist/assets/'
},
devDependencies: {
'babel-loader': '^7.1.0',
Expand All @@ -27,14 +27,19 @@ function addScriptDependencies (files = {}, context) {
'eslint-import-resolver-webpack': '^0.8.1',
'extract-text-webpack-plugin': '3.0.0',
'friendly-errors-webpack-plugin': '^1.6.1',
'html-webpack-plugin': '^2.29.0',
'webpack': '^3.2.0',
'webpack-bundle-analyzer': '^2.8.2',
'webpack-config-utils': '^2.3.0',
'webpack-dev-middleware': '^1.10.0',
'webpack-hot-middleware': '^2.18.0',
'webpack-merge': '^2.6.1'
'webpack-merge': '^2.6.1',
'webpack2-polyfill-plugin': '^0.0.2',
'write-file-webpack-plugin': '^4.1.0'
},
dependencies: {
'babel-polyfill': '^6.23.0',
'bowser': '^1.7.1',
'lazysizes': '^3.0.0',
'pyrsmk-toast': '^2.1.1',
'svgxuse': '^1.2.1'
Expand All @@ -45,7 +50,7 @@ function addScriptDependencies (files = {}, context) {
if (context.props.projectusage === 'craftCB' || context.props.projectusage === 'craft') {
extend(files.pkg, {
scripts: {
'webpack:analyze': 'webpack-bundle-analyzer stats.json dist/public/assets/'
'webpack:analyze': 'webpack-bundle-analyzer webpack/stats.json dist/public/assets/'
}
})
}
Expand All @@ -54,7 +59,7 @@ function addScriptDependencies (files = {}, context) {
if (context.props.projectusage === 'wordpress' || context.props.projectusage === 'wordpressCB') {
extend(files.pkg, {
scripts: {
'webpack:analyze': `webpack-bundle-analyzer stats.json dist/wp-content/themes/${context.props.projectname}/assets/`
'webpack:analyze': `webpack-bundle-analyzer webpack/stats.json dist/wp-content/themes/${context.props.projectname}/assets/`
}
})
}
Expand Down Expand Up @@ -92,14 +97,20 @@ function addScriptDependencies (files = {}, context) {
'eslint-config-vue': '^2.0.2',
'eslint-plugin-html': '^3.0.0',
'eslint-plugin-vue': '^2.0.1',
'file-loader': '^0.11.2',
'json-loader': '^0.5.7',
'optimize-css-assets-webpack-plugin': '^3.1.1',
'postcss-loader': '^2.0.6',
'sass-loader': '^6.0.6',
'sass-resources-loader': '^1.3.0',
'stylelint-webpack-plugin': '^0.8.0',
'svg-sprite-loader': '^3.2.4',
'vue-loader': '^13.0.2',
'vue-style-loader': '^3.0.0',
'vue-template-compiler': '^2.1.10'
},
dependencies: {
'vue': '^2.1.10'
'vue': '^2.4.0'
}
})
}
Expand Down
Loading

0 comments on commit a69f4a6

Please sign in to comment.