Skip to content

Commit

Permalink
Merge pull request #26 from viljamis/release/1.0.0
Browse files Browse the repository at this point in the history
Release/1.0.0
  • Loading branch information
arielsalminen authored Feb 22, 2018
2 parents b7eb539 + a33d4ef commit 279ec47
Show file tree
Hide file tree
Showing 54 changed files with 1,099 additions and 838 deletions.
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

9 changes: 0 additions & 9 deletions .editorconfig

This file was deleted.

6 changes: 3 additions & 3 deletions .postcssrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
module.exports = {
plugins: {
// to edit target browsers: use "browserslist" field in package.json
autoprefixer: {}
}
};
autoprefixer: {},
},
}
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package.json
package-lock.json
20 changes: 16 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,21 @@
"printWidth": 120,
"singleQuote": false,
"trailingComma": "all",
"bracketSpacing": false,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"parser": "babylon",
"semi": true,
"requirePragma": false
"semi": false,
"requirePragma": false,
"insertPragma": false,
"useTabs": false,
"tabWidth": 2,
"arrowParens": "avoid",
"proseWrap": "preserve",
"overrides": [
{
"files": "*.scss",
"options": {
"parser": "scss"
}
}
]
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: node_js
node_js:
- "6"
- "8.6.0"
- "node"
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
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.
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Vue Design System

[Vue Design System](https://vueds.com) is an open-source tool for prototyping UI design systems. It provides you and your team a set of organized tools, patterns & practices to build upon, so that you can get started with the actual design system faster.
[Vue Design System](https://vueds.com) is an open-source tool for building UI design systems. It provides you and your team a set of organized tools, patterns & practices to build upon, so that you can get started with the actual design system faster.

The tool is built on top of [Vue.js](https://vuejs.org), [Vue Styleguidist](https://github.com/vue-styleguidist/vue-styleguidist), [Vue Webpack Template](http://vuejs-templates.github.io/webpack/) & [Theo](https://github.com/salesforce-ux/theo) and is aimed for designers and front-end developers who have at least basic knowledge of component based workflows + HTML, SCSS & JavaScript.

Expand All @@ -12,19 +12,18 @@ Even though this is a system prototyping tool first and foremost, it has all the

[![Screenshot](./preview.gif)](https://vueds.com/)


## Features

* A set of interconnected patterns & practices for you and your team.
* Global design tokens that can be used inside any component.
* Design System can used as NPM dependency in another project.
* Simple and sane SVG icon and @font-face defaults.
* Live reloading for both the app and the system documentation.
* Automatic generation of documentation.
* Documentation and the app logic are separated, so you can have public docs while the app itself is private.
* Autoprefixing, SCSS, Webpack & CSS extraction included by default *(Extend with lint-on-save & unit tests).*
* Autoprefixing, SCSS, Webpack & CSS extraction included by default _(Extend with lint-on-save & unit tests)._
* And more…


## Documentation

* **[Getting Started](https://github.com/viljamis/vue-design-system/wiki/getting-started): How to install and run Vue Design System.**
Expand All @@ -35,25 +34,21 @@ Even though this is a system prototyping tool first and foremost, it has all the
* [Editing Living Documentation](https://github.com/viljamis/vue-design-system/wiki/editing-living-documentation): How to customize the living system documentation.
* [Component Status](https://github.com/viljamis/vue-design-system/wiki/Component-Status): Clear labels that reflect the state of completion.
* [Component QA](https://github.com/viljamis/vue-design-system/wiki/Component-QA): How to review new components and keep the quality high.
* [Frequently Asked Questions](https://github.com/viljamis/vue-design-system/wiki/frequently-asked-questions-(FAQ)): How to use icons, how to use font-face, etc.

* [Frequently Asked Questions](<https://github.com/viljamis/vue-design-system/wiki/frequently-asked-questions-(FAQ)>): How to use icons, how to use font-face, etc.

## Examples

* **[Vue Design System website](https://vueds.com)**


## Roadmap

* See [Roadmap tag](https://github.com/viljamis/vue-design-system/issues?q=is%3Aissue+is%3Aopen+label%3Aroadmap) in the issues.


## Changelog

* `0.4.3` is the latest release.
* `1.0.0` is the latest release.
* See [Releases page](https://github.com/viljamis/vue-design-system/releases) for the full changelog.


## Authors and License

[Viljami Salminen](https://viljamis.com), [Artem Sapegin](http://sapegin.me), [Rafael Escala](https://github.com/rafaesc), [react-styleguidist contributors](https://github.com/styleguidist/react-styleguidist/graphs/contributors), [vue-styleguidist contributors](https://github.com/vue-styleguidist/vue-styleguidist/graphs/contributors), [Vue.js contributors](https://github.com/vuejs/vue/graphs/contributors), [vue-webpack-boilerplate contributors](https://github.com/vuejs-templates/webpack/graphs/contributors) and & [Theo contributors](https://github.com/salesforce-ux/theo/graphs/contributors).
Expand Down
45 changes: 45 additions & 0 deletions build/build-system.js
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",
),
)
})
})
52 changes: 26 additions & 26 deletions build/build.js
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",
),
)
})
})
54 changes: 23 additions & 31 deletions build/check-versions.js
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)
}
};
}
10 changes: 5 additions & 5 deletions build/dev-client.js
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()
}
});
})
Loading

0 comments on commit 279ec47

Please sign in to comment.