Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Used path.join to join paths correctly (fixes #96)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsebastien committed Feb 13, 2016
1 parent dbdd3b2 commit 0eefaa8
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 27 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
* 0.3.3
* ...
* 0.4.0
* fixed an issue with production styles bundle (fixes #96)
* upgraded babel dependencies
* check the [upgrade](UPGRADE.MD) notes to know what you need to change
* 0.3.2
* Fixed production bundles paths (css, js) (fixes #91)
* 0.3.1
Expand Down
12 changes: 12 additions & 0 deletions UPGRADE.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Upgrade guide

## From 0.3.2 to 0.4.0
The way we construct the dist vendor css bundle has changed.
In your vendor.scss file, if you import third party stylesheets from jspm_packages or from node_modules, then you'll need to change the relative path.
Assuming that you have the same file structure as described in the [readme](README.md), then the import should look like this:

```
@import '../../jspm_packages/github/necolas/[email protected]/normalize.css'; // the path refers to the file at BUILD time
```

## From 0.3.1 to 0.3.2
No modification mandatory with this release.

## From 0.3.0 to 0.3.1
No modification mandatory with this release.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modern-web-dev-build",
"description": "Modern Web Development Build.",
"version": "0.3.3",
"version": "0.4.0",
"author": {
"name": "Sebastien Dubois",
"email": "[email protected]",
Expand Down
49 changes: 25 additions & 24 deletions src/gulp/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

import utils from "./utils";
import path from "path";

let extensions = {
javascript: ".js",
Expand Down Expand Up @@ -38,17 +39,17 @@ let globs = {
styles: {
css: "/**/*" + extensions.css,
sass: "/**/*" + extensions.sass,
vendor: folders.styles + "/vendor" + "{" + extensions.sass + "," + extensions.css + "}"
vendor: path.join(folders.styles, "/vendor" + "{" + extensions.sass + "," + extensions.css + "}")
},
images: folders.images + "/**/*" + "{" + extensions.png + "," + extensions.jpg + "," + extensions.jpeg + "," + extensions.gif + "," + extensions.svg + "}",
images: path.join(folders.images, "/**/*" + "{" + extensions.png + "," + extensions.jpg + "," + extensions.jpeg + "," + extensions.gif + "," + extensions.svg + "}"),
html: "/**/*" + extensions.html,
sourcemaps: "/**/*" + extensions.sourcemap
};

let files = {
any: "*",
packageJSON: folders.root + "/package.json",
typeScriptDefinitions: folders.typings + globs.scripts.typescript,
packageJSON: path.join(folders.root, "/package.json"),
typeScriptDefinitions: path.join(folders.typings, globs.scripts.typescript),
systemjsConfigDefault: "jspm.conf.js"
};

Expand All @@ -73,17 +74,17 @@ let finalJsBundleName = "bundle.min.js";

let javascript = {
src: [
folders.app + globs.scripts.javascript
path.join(folders.app, globs.scripts.javascript)
],
srcDist: folders.temp + "/core/boot.js",
srcDist: path.join(folders.temp, "/core/boot.js"),
dest: folders.temp,
destDist: folders.dist + "/" + finalJsBundleName,
destDist: path.join(folders.dist, "/" + finalJsBundleName),
finalJsBundlePath: finalJsBundleName
};

let typescript = {
srcAppOnly: [
folders.app + globs.scripts.typescript
path.join(folders.app, globs.scripts.typescript)
],
dest: folders.temp // JavaScript code is emitted in the temp folder
};
Expand All @@ -93,19 +94,19 @@ let finalCSSVendorBundleName = "vendor.min.css";

let styles = {
src: [
folders.app + globs.styles.css,
folders.app + globs.styles.sass
path.join(folders.app, globs.styles.css),
path.join(folders.app, globs.styles.sass)
],
srcVendorOnly: [
folders.app + globs.styles.vendor
path.join(folders.app, globs.styles.vendor)
],
srcWithoutVendor: [
folders.app + globs.styles.css,
folders.app + globs.styles.sass,
utils.exclude(folders.app + globs.styles.vendor)
path.join(folders.app, globs.styles.css),
path.join(folders.app, globs.styles.sass),
utils.exclude(path.join(folders.app, globs.styles.vendor))
],
dest: folders.temp, // for DEV
destFiles: folders.temp + globs.styles.css, // for DEV
destFiles: path.join(folders.temp, globs.styles.css), // for DEV
destDist: folders.dist, // for PROD
finalCssBundleFilename: finalCSSBundleName,
finalCssBundlePath: finalCSSBundleName,
Expand All @@ -115,28 +116,28 @@ let styles = {

let images = {
src: [
folders.app + globs.images
path.join(folders.app, globs.images)
],
dest: folders.dist + folders.images
dest: path.join(folders.dist, folders.images)
};

let html = {
src: [
folders.app + globs.html
path.join(folders.app, globs.html)
],
dest: folders.dist
};

let copy = {
src: [
folders.app + globs.any,
path.join(folders.app, globs.any),

// ignore stuff handled by the other tasks
utils.exclude(folders.app + globs.html),
utils.exclude(folders.app + globs.styles.css),
utils.exclude(folders.app + globs.styles.sass),
utils.exclude(folders.app + globs.scripts.javascript),
utils.exclude(folders.app + globs.scripts.typescript)
utils.exclude(path.join(folders.app, globs.html)),
utils.exclude(path.join(folders.app, globs.styles.css)),
utils.exclude(path.join(folders.app, globs.styles.sass)),
utils.exclude(path.join(folders.app, globs.scripts.javascript)),
utils.exclude(path.join(folders.app, globs.scripts.typescript))
],
dest: folders.dist
};
Expand Down

0 comments on commit 0eefaa8

Please sign in to comment.