Skip to content

Commit

Permalink
Replace bower with npm
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed May 8, 2018
1 parent 50b438b commit 59e0c1c
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 93 deletions.
6 changes: 0 additions & 6 deletions .bowerrc

This file was deleted.

63 changes: 21 additions & 42 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ module.exports = (grunt) ->
]
)

@registerTask(
"init"
"Only needed when the repo is first cloned"
[
"install-dependencies"
"hub"
]
)

@registerTask(
"deploy"
"Build and deploy artifacts to wet-boew-dist"
Expand Down Expand Up @@ -183,8 +174,8 @@ module.exports = (grunt) ->
# Metadata.
pkg: @file.readJSON "package.json"
themeDist: "dist/<%= pkg.name %>"
jqueryVersion: @file.readJSON "lib/jquery/bower.json"
jqueryOldIEVersion: @file.readJSON "lib/jquery-oldIE/bower.json"
#jqueryVersion: grunt.file.readJSON("lib/jquery/bower.json")
#jqueryOldIEVersion: grunt.file.readJSON("lib/jquery-oldIE/bower.json")
banner: "/*!\n * Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)\n * wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html\n" +
" * v<%= pkg.version %> - " + "<%= grunt.template.today('yyyy-mm-dd') %>\n *\n */"

Expand Down Expand Up @@ -212,7 +203,6 @@ module.exports = (grunt) ->

clean:
dist: [ "dist"]
lib: ["lib"]
deps: ["<%= themeDist %>/theme-js-deps"]

concat:
Expand All @@ -230,22 +220,22 @@ module.exports = (grunt) ->

test:
src: [
"lib/wet-boew/src/test.js"
"node_modules/wet-boew/src/test.js"
"src/**/test.js"
]
dest: "dist/unmin/test/tests.js"

copy:
wetboew:
expand: true
cwd: "lib/wet-boew/dist"
cwd: "node_modules/wet-boew/dist"
src: [
"wet-boew/**/*.*"
]
dest: "dist"
wetboew_demo:
expand: true
cwd: "lib/wet-boew/dist/unmin"
cwd: "node_modules/wet-boew/dist/unmin"
src: [
"demos/**/*.*"
"docs/**/*.*"
Expand All @@ -255,7 +245,7 @@ module.exports = (grunt) ->
dest: "dist/unmin"
wetboew_demo_min:
expand: true
cwd: "lib/wet-boew/dist"
cwd: "node_modules/wet-boew/dist"
src: "<%= copy.wetboew_demo.src %>"
dest: "dist"
site:
Expand All @@ -277,7 +267,7 @@ module.exports = (grunt) ->
js_lib:
expand: true
flatten: true
cwd: "lib"
cwd: "node_modules"
src: [
"jsonpointer/src/jsonpointer.js"
"JSON-Patch/src/json-patch.js"
Expand Down Expand Up @@ -406,6 +396,10 @@ module.exports = (grunt) ->
]

sass:
options:
includePaths: [
"./node_modules"
]
all:
expand: true
cwd: "src"
Expand Down Expand Up @@ -508,15 +502,15 @@ module.exports = (grunt) ->
sanitize: false
production: false
data: [
"lib/wet-boew/site/data/**/*.{yml,json}"
"node_modules/wet-boew/site/data/**/*.{yml,json}"
"site/data/**/*.{yml,json}"
]
helpers: [
"lib/wet-boew/site/helpers/helper{,s}-*.js"
"node_modules/wet-boew/site/helpers/helper{,s}-*.js"
"site/helpers/helper{,s}-*.js"
]
partials: [
"lib/wet-boew/site/includes/**/*.hbs"
"node_modules/wet-boew/site/includes/**/*.hbs"
"site/includes/**/*.hbs"
]
layoutdir: "site/layouts"
Expand All @@ -528,7 +522,7 @@ module.exports = (grunt) ->

ajax:
options:
layoutdir: "lib/wet-boew/site/layouts"
layoutdir: "node_modules/wet-boew/site/layouts"
layout: "ajax.hbs"

cwd: "site/pages/ajax"
Expand Down Expand Up @@ -561,34 +555,34 @@ module.exports = (grunt) ->
,
#docs
expand: true
cwd: "lib/wet-boew/site/pages/docs"
cwd: "node_modules/wet-boew/site/pages/docs"
src: [
"**/*.hbs"
]
dest: "dist/unmin/docs"
,
#plugins
expand: true
cwd: "lib/wet-boew/site/pages/demos"
cwd: "node_modules/wet-boew/site/pages/demos"
src: [
"**/*.hbs"
]
dest: "dist/unmin/demos"
,
expand: true
cwd: "lib/wet-boew/src/plugins"
cwd: "node_modules/wet-boew/src/plugins"
src: [
"**/*.hbs"
]
dest: "dist/unmin/demos"
,
expand: true
cwd: "lib/wet-boew/src/polyfills"
cwd: "node_modules/wet-boew/src/polyfills"
src: "**/*.hbs"
dest: "dist/unmin/demos"
,
expand: true
cwd: "lib/wet-boew/src/other"
cwd: "node_modules/wet-boew/src/other"
src: "**/*.hbs"
dest: "dist/unmin/demos"
]
Expand Down Expand Up @@ -729,28 +723,13 @@ module.exports = (grunt) ->

eslint:
options:
configFile: if process.env.CI == "true" then "lib/wet-boew/.eslintrc.ci.json" else "lib/wet-boew/.eslintrc.json"
configFile: if process.env.CI == "true" then "node_modules/wet-boew/.eslintrc.ci.json" else "node_modules/wet-boew/.eslintrc.json"
quiet: true
all:
src: [
"src/**/*.js"
]

hub:
"wet-boew":
src: [
"lib/wet-boew/Gruntfile.coffee"
]
tasks: [
"dist"
]

"install-dependencies":
options:
cwd: "lib/wet-boew"
failOnError: false
isDevelopment: true

connect:
options:
port: 8000
Expand Down
27 changes: 0 additions & 27 deletions bower.json

This file was deleted.

16 changes: 10 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.html",
"scripts": {
"test": "grunt test",
"postinstall": "bower update",
"prepare": "grunt dist",
"travis_script": "grunt dist test-mocha",
"travis_after_success": "grunt deploy"
},
Expand All @@ -29,13 +29,18 @@
],
"author": "",
"license": "MIT",
"dependencies": {
"fast-json-patch": "github:wet-boew/JSON-Patch#wb1.0+1.1.4",
"jsonpointer.js": "^0.4.0",
"wet-boew": "wet-boew/wet-boew"
},
"devDependencies": {
"assemble-contrib-i18n": "~0.1.2",
"assemble-contrib-i18n": "0.1.*",
"eslint-config-jquery": "^1.0.0",
"expect.js": "^0.3.1",
"grunt": "~0.4.5",
"grunt-assemble": "~0.6.3",
"grunt-autoprefixer": "^0.7.2",
"grunt-autoprefixer": "^3.0.3",
"grunt-banner": "^0.3.1",
"grunt-bootlint": "^0.9.1",
"grunt-check-dependencies": "~0.6.0",
Expand All @@ -53,14 +58,13 @@
"grunt-html": "^5.0.0",
"grunt-hub": "~0.7.0",
"grunt-i18n-csv": "0.1.0",
"grunt-install-dependencies": "~0.2.0",
"grunt-mocha": "~0.4.12",
"grunt-sass": "^1.0.0",
"grunt-sass": "^2.0.0",
"grunt-sass-lint": "^0.2.0",
"grunt-wet-boew-postbuild": "^0.1.4",
"load-grunt-tasks": "^3.2.0",
"mocha": "^1.21.5",
"sinon": "~1.12.2",
"time-grunt": "~1.3.0"
}
}
}
2 changes: 1 addition & 1 deletion site/layouts/default.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
{
"layout": "../../lib/wet-boew/site/layouts/core.hbs"
"layout": "../../node_modules/wet-boew/site/layouts/core.hbs"
}
---
{{>google}}
Expand Down
2 changes: 1 addition & 1 deletion src/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ $menu-colour: #555;

$input-color-placeholder: #5c5c5c !important;

@import "../lib/wet-boew/src/variables";
@import "wet-boew/src/variables";
4 changes: 2 additions & 2 deletions src/ie8-theme-srv.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

@import "variables";

@import "../lib/wet-boew/src/base/ie8-bootstrap";
@import "wet-boew/src/base/ie8-bootstrap";

/* WET Core */
@import "../lib/wet-boew/src/base/ie8-wet-boew";
@import "wet-boew/src/base/ie8-wet-boew";

/*
Views
Expand Down
6 changes: 2 additions & 4 deletions src/ie8-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

@import "variables";

@import "../lib/wet-boew/src/base/ie8-bootstrap";
@import "wet-boew/src/base/ie8-bootstrap";

/* WET Core */
@import "../lib/wet-boew/src/base/ie8-wet-boew";
@import "wet-boew/src/base/ie8-wet-boew";

/*
* GCWeb Theme
Expand Down Expand Up @@ -151,5 +151,3 @@
@import "share/print";
@import "social-media-icons/print";
}


4 changes: 2 additions & 2 deletions src/theme-srv.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

@import "variables";

@import "../lib/wet-boew/src/base/bootstrap";
@import "wet-boew/src/base/bootstrap";

/* WET Core */
@import "../lib/wet-boew/src/base/wet-boew";
@import "wet-boew/src/base/wet-boew";

/*
Views
Expand Down
4 changes: 2 additions & 2 deletions src/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

@import "variables";

@import "../lib/wet-boew/src/base/bootstrap";
@import "wet-boew/src/base/bootstrap";

/* WET Core */
@import "../lib/wet-boew/src/base/wet-boew";
@import "wet-boew/src/base/wet-boew";

/*
* GCWeb Theme
Expand Down

0 comments on commit 59e0c1c

Please sign in to comment.