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

Commit

Permalink
đź“ť Add Readme, licence and others
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Feb 24, 2017
1 parent 9db2e64 commit 6e41276
Show file tree
Hide file tree
Showing 10 changed files with 697 additions and 149 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules
reports
dist
.DS_Store
node_modules/
npm-debug.log
test/coverage
dist
yarn-error.log
reports
36 changes: 36 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Contributing

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/posva/vue-mdc).


## Pull Requests

- **Keep the same style** - eslint will automatically be ran before committing

- **Tip** to pass lint tests easier use the `npm run lint:fix` command

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create feature branches** - Don't ask us to pull from your master branch.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure your commits message means something


## Running Tests

Launch visual tests and watch the components at the same time

``` bash
$ npm run dev
```


**Happy coding**!
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2017 Eduardo San Martin Morote

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# VueMdc

[![npm](https://img.shields.io/npm/v/vue-mdc.svg)](https://www.npmjs.com/package/vue-mdc) [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/)

> Material Components Web for Vue.js
## Installation

```bash
npm install --save vue-mdc
```

## Usage

### Bundler (Webpack, Rollup)

```js
import Vue from 'vue'
import VueMdc from 'vue-mdc'
// You need a specific loader for CSS files like https://github.com/webpack/css-loader
import 'vue-mdc/dist/vue-mdc.css'

Vue.use(VueMdc)
```

### Browser

```html
<!-- Include after Vue -->
<!-- Local files -->
<link rel="stylesheet" href="vue-mdc/dist/vue-mdc.css"></link>
<script src="vue-mdc/dist/vue-mdc.js"></script>

<!-- From CDN -->
<link rel="stylesheet" href="https://unpkg.com/vue-mdc/dist/vue-mdc.css"></link>
<script src="https://unpkg.com/vue-mdc"></script>
```

## Development

### Launch visual tests

```bash
npm run dev
```

### Launch Karma with coverage

```bash
npm run dev:coverage
```

### Build

Bundle the js and css of to the `dist` folder:

```bash
npm run build
```


## Publishing

The `prepublish` hook will ensure dist files are created before publishing. This
way you don't need to commit them in your repository.

```bash
# Bump the version first
# It'll also commit it and create a tag
npm version
# Push the bumped package and tags
git push --follow-tags
# Ship it 🚀
npm publish
```

## License

[MIT](http://opensource.org/licenses/MIT)
5 changes: 4 additions & 1 deletion build/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ const sassOptions = {
}

// don't extract css in test mode
const nullLoader = process.env.NODE_ENV === 'common' ? 'null-loader!' : ''
exports.vueLoaders =
process.env.BABEL_ENV === 'test' ? {
css: 'css-loader',
scss: `css-loader!sass-loader?${JSON.stringify(sassOptions)}`,
} : {
css: ExtractTextPlugin.extract(`${nullLoader}css-loader`),
scss: ExtractTextPlugin.extract(
`${process.env.NODE_ENV === 'common' ? 'null-loader!' : ''}css-loader!sass-loader?${JSON.stringify(sassOptions)}`
`${nullLoader}css-loader!sass-loader?${JSON.stringify(sassOptions)}`
),
}
3 changes: 2 additions & 1 deletion build/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
module: {
rules: [
{
test: /.js$/,
test: /.jsx?$/,
use: 'babel-loader',
include: [
resolve(__dirname, '../node_modules/@material'),
Expand All @@ -50,6 +50,7 @@ module.exports = {
loader: 'vue-loader',
options: {
loaders: vueLoaders,
postcss: [require('postcss-cssnext')()],
},
},
],
Expand Down
52 changes: 35 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
{
"name": "vue-mdc",
"version": "0.0.0",
"description": "Material Components Web for Vue.js",
"author": "Eduardo San Martin Morote <posva13@gmail.com>",
"main": "dist/vue-mdc.common.js",
"browser": "dist/vue-mdc.js",
"unpkg": "dist/vue-mdc.js",
"style": "dist/vue-mdc.css",
"author": "Eduardo San Martin Morote <posva13@gmail.com>",
"license": "MIT",
"files": [
"dist",
"src"
],
"scripts": {
"dev": "cross-env NODE_ENV=dev webpack-dashboard -- webpack-dev-server --config build/webpack.config.dev.js --open",
"test": "yon run lint && yon run test:unit",
"test:unit": "cross-env BABEL_ENV=test karma start test/karma.conf.js --single-run",
"clean": "rimraf dist",
"build": "yon run build:common && yon run build:browser && yon run build:browser:min",
"build:common": "cross-env NODE_ENV=common webpack --config build/webpack.config.common.js --progress --hide-modules",
"build:browser:base": "webpack --config build/webpack.config.browser.js --progress --hide-modules",
"build:browser": "cross-env NODE_ENV=browser yon run build:browser:base",
"build:browser:min": "cross-env NODE_ENV=production yon build:browser:base -- -p",
"build:dll": "webpack --progress --config build/webpack.config.dll.js",
"postinstall": "yon run build:dll",
"lint": "eslint --ext js --ext jsx --ext vue src test/**/*.spec.js test/*.js build",
"lint:fix": "yon run lint -- --fix",
"lint:fix": "yon run lint:js -- --fix",
"lint:staged": "lint-staged",
"build": "yon run build:common && yon run build:browser && yon run build:browser:min",
"build:browser": "cross-env NODE_ENV=browser yon run build:browser:base",
"build:browser:base": "webpack --config build/webpack.config.browser.js --progress --hide-modules",
"build:browser:min": "cross-env NODE_ENV=production yon build:browser:base -- -p",
"build:common": "cross-env NODE_ENV=common webpack --config build/webpack.config.common.js --progress --hide-modules"
"pretest": "yon run lint",
"test": "cross-env BABEL_ENV=test karma start test/karma.conf.js --single-run",
"dev": "webpack-dashboard -- webpack-dev-server --config build/webpack.config.dev.js --open",
"dev:coverage": "cross-env BABEL_ENV=test karma start test/karma.conf.js",
"prepublish": "yon run build"
},
"lint-staged": {
"*.{vue,jsx,js}": [
Expand All @@ -34,27 +37,27 @@
},
"pre-commit": "lint:staged",
"devDependencies": {
"null-loader": "^0.1.1",
"add-asset-html-webpack-plugin": "^1.0.2",
"babel-core": "^6.23.1",
"babel-eslint": "^7.1.1",
"babel-helper-vue-jsx-merge-props": "^2.0.2",
"babel-loader": "^6.3.2",
"babel-plugin-istanbul": "^4.0.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-vue-jsx": "^3.3.0",
"babel-preset-env": "^1.1.8",
"chai": "^3.5.0",
"cross-env": "^3.1.4",
"css-loader": "^0.26.1",
"eslint": "^3.15.0",
"eslint": "^3.16.1",
"eslint-config-vue": "^2.0.2",
"eslint-plugin-vue": "^2.0.1",
"extract-text-webpack-plugin": "beta",
"function-bind": "^1.1.0",
"html-webpack-plugin": "^2.28.0",
"karma": "^1.4.1",
"karma": "^1.5.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
Expand All @@ -75,15 +78,18 @@
"style-loader": "^0.13.1",
"uppercamelcase": "^1.1.0",
"vue": "^2.1.10",
"vue-loader": "^11.0.0",
"vue-loader": "^11.1.0",
"vue-template-compiler": "^2.1.10",
"webpack": "^2.2.1",
"webpack-bundle-analyzer": "^2.3.0",
"webpack-dashboard": "^0.3.0",
"webpack-dev-server": "^2.3.0",
"webpack-merge": "^2.6.1",
"webpack-dev-server": "^2.4.1",
"webpack-merge": "^3.0.0",
"yarn-or-npm": "^2.0.3"
},
"peerDependencies": {
"vue": "^2.1.10"
},
"dllPlugin": {
"name": "visualTestingDeps",
"include": [
Expand Down Expand Up @@ -127,5 +133,17 @@
]
}
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/posva/vue-mdc.git"
},
"bugs": {
"url": "https://github.com/posva/vue-mdc/issues"
},
"homepage": "https://github.com/posva/vue-mdc#readme",
"license": {
"type": "MIT",
"url": "http://www.opensource.org/licenses/mit-license.php"
}
}
28 changes: 0 additions & 28 deletions src/Ripple.vue

This file was deleted.

Loading

0 comments on commit 6e41276

Please sign in to comment.