Skip to content

Commit

Permalink
update deps, and support yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
tardyp committed Oct 23, 2016
1 parent 2236f60 commit a8a816e
Show file tree
Hide file tree
Showing 9 changed files with 6,135 additions and 22 deletions.
2 changes: 1 addition & 1 deletion www/guanlecoja/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ node_js:
- "6.1"

before_install:
- npm install -g gulp
- npm install -g gulp yarn

script:
- ./test.sh
7 changes: 5 additions & 2 deletions www/guanlecoja/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ It integrates several web technologies and methodologies together to accelerate
- Angularjs: MVC framework
- Less: CSS preprocessor
- Coffee-script: Javascript language
- Jade: template engine
- pug: template engine (formerly known as jade)
- Bootstrap: css framework
- bower: js library

Expand Down Expand Up @@ -111,7 +111,7 @@ https://github.com/buildbot/guanlecoja/blob/master/defaultconfig.coffee
* `files.tests`(list of globs): tests source code. Can be coffee or JS. built in `tests.js`
* `files.fixtures`(list of globs): fixtures for tests. Those fixtures can be json files, or text files, are built in `tests.js`, and populated in window.FIXTURES global variable in the test environment.
* `files.templates`(list of globs): references the templates. All the templates are built in `scripts.js`, and loaded automatically in angularjs's template cache.
* `files.index`: references the jade file that generates main `index.htm` entrypoint for your SPA. Your index.jade should load built `scripts.js`, and `styles.css`
* `files.index`: references the pug/jade file that generates main `index.htm` entrypoint for your SPA. Your index.pug should load built `scripts.js`, and `styles.css`
* `files.less`: references the less files. By default they can be anywhere in the source code, and are concatenated in styles.css. Order is undefined, so make sure to not have order dependent styling.
* `files.images`: those images are just copied to `#{config.dir.build}/img`
* `files.fonts`: those fonts are just copied to `#{config.dir.build}/fonts`
Expand Down Expand Up @@ -250,6 +250,9 @@ You can see it in action at https://github.com/buildbot/buildbot/tree/master/www

### ChangeLog

* 0.8.1: Some jade->pug fixes. beware that with jade-pug the default extension is .pug so extends "layout" will look for layout.pug
You can just rename your layout file or extend with explicit file extension
* 0.8.0: upgrade dependencies. (gulp-minify-css -> gulp-clean-css, gulp-jade -> gulp-pug). Fix node dependencies to make yarn work.
* 0.7.2: upgrade gulp-if: fixes issue with node6
* 0.7.0: upgrade gulp-bower-deps. This gives you BOWERDEPS global variable
* 0.6.2: fix and upgrade phantomjs to 2.1.1. This will help on the stability of the builds.
Expand Down
4 changes: 3 additions & 1 deletion www/guanlecoja/defaultconfig.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ module.exports =

# Jade templates
templates: [
'src/**/*.tpl.pug'
'src/**/*.tpl.jade'
]

# Jade index
index: [
'src/app/index.pug'
'src/app/index.jade'
]
# Less stylesheets
Expand Down Expand Up @@ -93,7 +95,7 @@ module.exports =
# produce a templates.js file with all the jade templates in it.
templates_apart: false

# produce jade templates as js code, instead of html in angular's templatesCache
# produce pug/jade templates as js code, instead of html in angular's templatesCache
# templates function will be available in templates_global
templates_as_js: false
templates_global: "TEMPLATES"
Expand Down
6 changes: 4 additions & 2 deletions www/guanlecoja/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ module.exports = (gulp) ->
catch_errors = (s) ->
s.on "error", (e) ->
error = gutil.colors.bold.red
if e.filename?
if e.filename? and e.location?
gutil.log(error("#{e.plugin}:#{e.name}: #{e.filename} +#{e.location.first_line}"))
else if e.fileName?
gutil.log(error("#{e.plugin}:#{e.name}: #{e.fileName} +#{e.lineNumber}"))
Expand All @@ -106,7 +106,7 @@ module.exports = (gulp) ->
s.end()
s.emit("end")
if not dev
throw e
throw "stopping because of previous error"
return null
s

Expand Down Expand Up @@ -166,6 +166,7 @@ module.exports = (gulp) ->
.pipe(catch_errors(gif("*.coffee", coffeeCompile())))
# jade build
.pipe(catch_errors(gif("*.jade", jadeCompile())))
.pipe(catch_errors(gif("*.pug", jadeCompile())))
.pipe remember('scripts')
.pipe(gif("*.html", templateCache({module:config.name})))
.pipe(catch_errors(gif("*.jjs", jadeConcat())))
Expand Down Expand Up @@ -197,6 +198,7 @@ module.exports = (gulp) ->
gulp.src config.files.templates
# jade build
.pipe(catch_errors(gif("*.jade", jade())))
.pipe(catch_errors(gif("*.pug", jade())))
.pipe gif "*.html", rename (p) ->
if config.name? and config.name isnt 'app'
p.dirname = path.join(config.name, "views")
Expand Down
19 changes: 9 additions & 10 deletions www/guanlecoja/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"coffeescript",
"js",
"less",
"jade",
"pug",
"bootstrap"
],
"author": {
Expand All @@ -43,18 +43,18 @@
"gulp-bower-deps": "~0.3.0",
"gulp-browserify": "^0.5.0",
"gulp-cached": "~1.1.0",
"gulp-clean-css": "^2.0.13",
"gulp-coffee": "~2.3.1",
"gulp-concat": "~2.6.0",
"gulp-fixtures2js": "0.0.1",
"gulp-footer": "1.x",
"gulp-header": "1.x",
"gulp-help": "~1.6.1",
"gulp-if": "~2.0.1",
"gulp-jade": "~1.1.0",
"gulp-less": "~1.3.2",
"gulp-livereload": "~3.8.0",
"gulp-minify-css": "~1.2.1",
"gulp-ng-annotate": "~1.1.0",
"gulp-pug": "^3.1.0",
"gulp-remember": "~0.3.0",
"gulp-rename": "~1.2.0",
"gulp-replace": "^0.5.4",
Expand All @@ -72,25 +72,24 @@
"dependencies": {
"coffee-script": "~1.10.0",
"gulp-ng-classify": "~4.0.0",
"gulp-sass": "^2.1.1",
"gulp-util": "~3.0.6",
"jasmine-core": "^2.4.1",
"karma": "~0.13.9",
"karma-coffee-preprocessor": "~0.3.0",
"karma-coverage": "^0.5.1",
"karma-jasmine": "~0.3.6",
"karma-phantomjs-launcher": "~1.0.0",
"karma-sourcemap-loader": "^0.3.5",
"jasmine-core": "^2.4.1",
"phantomjs-prebuilt": "2.1.7",
"gulp-sass": "^2.1.1"

"phantomjs-prebuilt": "2.1.7"
},
"main": "./main",
"bin": {},
"engines": {
"node": "~4.4.0",
"npm": "<3.0.0"
"node": ">4.4.0",
"npm": ">2.0.0"
},
"version": "0.7.2",
"version": "0.8.0",
"license": "MIT",
"readmeFilename": "README.md",
"scripts": {}
Expand Down
6 changes: 3 additions & 3 deletions www/guanlecoja/test.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
set -e
gulp scripts vendors
npm link
yarn link || true
cd test
npm install
npm link guanlecoja
yarn install
yarn link guanlecoja ||true
gulp
gulp --coverage
2 changes: 1 addition & 1 deletion www/guanlecoja/test/src/app/index.jade
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
extends layout
extends layout.jade
block content
ui-view
4 changes: 2 additions & 2 deletions www/guanlecoja/vendors.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports =
cached: require 'gulp-cached'
remember: require 'gulp-remember'
uglify: require 'gulp-uglify'
jade: require 'gulp-jade'
jade: require 'gulp-pug'
wrap: require 'gulp-wrap'
rename: require 'gulp-rename'
connect: require 'connect'
Expand All @@ -20,7 +20,7 @@ module.exports =
rimraf: require 'rimraf'
templateCache: require 'gulp-angular-templatecache'
lr: require 'gulp-livereload'
cssmin: require 'gulp-minify-css'
cssmin: require 'gulp-clean-css'
less: require 'gulp-less'
fixtures2js: require 'gulp-fixtures2js'
gulp_help: require 'gulp-help'
Expand Down
Loading

0 comments on commit a8a816e

Please sign in to comment.