-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from viljamis/release/1.0.0
Release/1.0.0
- Loading branch information
Showing
54 changed files
with
1,099 additions
and
838 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package.json | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "8.6.0" | ||
- "node" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Contributing to Design System | ||
|
||
The following is a set of guidelines for contributing to Vue Design System. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. | ||
|
||
## How to Contribute | ||
|
||
1. When contributing, please first discuss the change(s) you wish to make via [an issue](https://github.com/viljamis/vue-design-system/issues/new) with Vue Design System team. | ||
2. In most cases, we should be extending existing components instead of creating new ones. You might find [this diagram useful](https://coggle.it/diagram/V0hkiP976OIbGpy8/t/vanilla-pattern). | ||
3. If you _really_ need to add a new component, please [review example component](https://github.com/viljamis/vue-design-system/blob/master/src/ExampleComponent.vue) first. It shows you how to structure and document your component. | ||
4. If you wonder whether you should create an Element or a Pattern, ask yourself: _“can this be broken down into smaller pieces?”_ If the answer is yes, there’s a high chance that it should be a Pattern instead of an Element. For a more thorough explanation, [see terminology](https://github.com/viljamis/vue-design-system/wiki/terminology). | ||
5. Components in the system are labelled with status labels that reflect their state of completion. Make sure to update the status on any component you work on. _[See an example](https://github.com/viljamis/vue-design-system/blob/master/src/ExampleComponent.vue#L8-L23)._ | ||
6. Finally, when you’re done, submit your pull request and ask someone from Vue Design System team to review it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"use strict" | ||
require("./check-versions")() | ||
|
||
process.env.NODE_ENV = "production" | ||
|
||
const ora = require("ora") | ||
const rm = require("rimraf") | ||
const path = require("path") | ||
const chalk = require("chalk") | ||
const webpack = require("webpack") | ||
const config = require("../config") | ||
const webpackConfig = require("./webpack.system.conf") | ||
|
||
const spinner = ora("Building Design System Library...") | ||
spinner.start() | ||
|
||
rm(path.join(config.system.assetsRoot, config.system.assetsSubDirectory), err => { | ||
if (err) throw err | ||
webpack(webpackConfig, function(err, stats) { | ||
spinner.stop() | ||
if (err) throw err | ||
process.stdout.write( | ||
stats.toString({ | ||
colors: true, | ||
modules: false, | ||
children: false, | ||
chunks: false, | ||
chunkModules: false, | ||
}) + "\n\n", | ||
) | ||
|
||
if (stats.hasErrors()) { | ||
console.log(chalk.red(" Design System Library build failed with errors.\n")) | ||
process.exit(1) | ||
} | ||
|
||
console.log(chalk.cyan(" Design System Library build complete.\n")) | ||
console.log( | ||
chalk.yellow( | ||
" Tip: You can now publish your library as a private NPM module.\n" + | ||
" Users can import it as an ES6 module: import DesignSystem from 'system'\n", | ||
), | ||
) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
"use strict"; | ||
require("./check-versions")(); | ||
"use strict" | ||
require("./check-versions")() | ||
|
||
process.env.NODE_ENV = "production"; | ||
process.env.NODE_ENV = "production" | ||
|
||
const ora = require("ora"); | ||
const rm = require("rimraf"); | ||
const path = require("path"); | ||
const chalk = require("chalk"); | ||
const webpack = require("webpack"); | ||
const config = require("../config"); | ||
const webpackConfig = require("./webpack.prod.conf"); | ||
const ora = require("ora") | ||
const rm = require("rimraf") | ||
const path = require("path") | ||
const chalk = require("chalk") | ||
const webpack = require("webpack") | ||
const config = require("../config") | ||
const webpackConfig = require("./webpack.prod.conf") | ||
|
||
const spinner = ora("building for production..."); | ||
spinner.start(); | ||
const spinner = ora("Building Vue Design System for production...") | ||
spinner.start() | ||
|
||
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => { | ||
if (err) throw err; | ||
if (err) throw err | ||
webpack(webpackConfig, function(err, stats) { | ||
spinner.stop(); | ||
if (err) throw err; | ||
spinner.stop() | ||
if (err) throw err | ||
process.stdout.write( | ||
stats.toString({ | ||
colors: true, | ||
modules: false, | ||
children: false, | ||
chunks: false, | ||
chunkModules: false | ||
}) + "\n\n" | ||
); | ||
chunkModules: false, | ||
}) + "\n\n", | ||
) | ||
|
||
if (stats.hasErrors()) { | ||
console.log(chalk.red(" Build failed with errors.\n")); | ||
process.exit(1); | ||
console.log(chalk.red(" Vue Design System build failed with errors.\n")) | ||
process.exit(1) | ||
} | ||
|
||
console.log(chalk.cyan(" Build complete.\n")); | ||
console.log(chalk.cyan(" Vue Design System build complete.\n")) | ||
console.log( | ||
chalk.yellow( | ||
" Tip: built files are meant to be served over an HTTP server.\n" + | ||
" Opening index.html over file:// won't work.\n" | ||
) | ||
); | ||
}); | ||
}); | ||
" Opening index.html over file:// won't work.\n", | ||
), | ||
) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,51 @@ | ||
"use strict"; | ||
const chalk = require("chalk"); | ||
const semver = require("semver"); | ||
const packageConfig = require("../package.json"); | ||
const shell = require("shelljs"); | ||
"use strict" | ||
const chalk = require("chalk") | ||
const semver = require("semver") | ||
const packageConfig = require("../package.json") | ||
const shell = require("shelljs") | ||
function exec(cmd) { | ||
return require("child_process") | ||
.execSync(cmd) | ||
.toString() | ||
.trim(); | ||
.trim() | ||
} | ||
|
||
const versionRequirements = [ | ||
{ | ||
name: "node", | ||
currentVersion: semver.clean(process.version), | ||
versionRequirement: packageConfig.engines.node | ||
} | ||
]; | ||
versionRequirement: packageConfig.engines.node, | ||
}, | ||
] | ||
|
||
if (shell.which("npm")) { | ||
versionRequirements.push({ | ||
name: "npm", | ||
currentVersion: exec("npm --version"), | ||
versionRequirement: packageConfig.engines.npm | ||
}); | ||
versionRequirement: packageConfig.engines.npm, | ||
}) | ||
} | ||
|
||
module.exports = function() { | ||
const warnings = []; | ||
const warnings = [] | ||
for (let i = 0; i < versionRequirements.length; i++) { | ||
const mod = versionRequirements[i]; | ||
const mod = versionRequirements[i] | ||
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) { | ||
warnings.push( | ||
mod.name + | ||
": " + | ||
chalk.red(mod.currentVersion) + | ||
" should be " + | ||
chalk.green(mod.versionRequirement) | ||
); | ||
mod.name + ": " + chalk.red(mod.currentVersion) + " should be " + chalk.green(mod.versionRequirement), | ||
) | ||
} | ||
} | ||
|
||
if (warnings.length) { | ||
console.log(""); | ||
console.log( | ||
chalk.yellow( | ||
"To use this template, you must update following to modules:" | ||
) | ||
); | ||
console.log(); | ||
console.log("") | ||
console.log(chalk.yellow("To use this template, you must update following to modules:")) | ||
console.log() | ||
for (let i = 0; i < warnings.length; i++) { | ||
const warning = warnings[i]; | ||
console.log(" " + warning); | ||
const warning = warnings[i] | ||
console.log(" " + warning) | ||
} | ||
console.log(); | ||
process.exit(1); | ||
console.log() | ||
process.exit(1) | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
/* eslint-disable */ | ||
"use strict"; | ||
require("eventsource-polyfill"); | ||
var hotClient = require("webpack-hot-middleware/client?noInfo=true&reload=true"); | ||
"use strict" | ||
require("eventsource-polyfill") | ||
var hotClient = require("webpack-hot-middleware/client?noInfo=true&reload=true") | ||
|
||
hotClient.subscribe(function(event) { | ||
if (event.action === "reload") { | ||
window.location.reload(); | ||
window.location.reload() | ||
} | ||
}); | ||
}) |
Oops, something went wrong.