Skip to content

Commit

Permalink
feat(Vue): add Vue.js component library
Browse files Browse the repository at this point in the history
  • Loading branch information
wzpo committed Jul 4, 2019
1 parent 096740b commit 204bed1
Show file tree
Hide file tree
Showing 39 changed files with 9,858 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ packages
**/yarn-*
**/webpack-stats.json
**/types
!/vue/types
**/bundles
**/*.d.ts
!/vue/**/*.d.ts
**/*.js.map
/data/
angular/yarn.lock
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"./icons",
"./react",
"./utils",
"./vue",
"./www"
],
"nohoist": [
Expand Down
45 changes: 45 additions & 0 deletions vue/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"presets": [
[
"env",
{
"loose": true,
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}
],
"stage-2"
],
"plugins": ["transform-vue-jsx"],
"env": {
"utils": {
"presets": [
[
"env",
{
"loose": true,
"modules": "commonjs",
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}
],
],
"plugins": [
["module-resolver", {
"root": ["momentum-ui"],
"alias": {
"momentum-ui/src": "momentum-ui/lib"
}
}]
]
},
"test": {
"presets": [
["env", { "targets": { "node": "current" }}]
]
}
}
}
4 changes: 4 additions & 0 deletions vue/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src/app
node_modules
lib
*.md
173 changes: 173 additions & 0 deletions vue/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
module.exports = {
'root': true,

'env': {
'browser': true,
'node': true,
'amd': false,
'jest': true,
},

'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
'ecmaFeatures': {
'experimentalObjectRestSpread': true,
'jsx': true
}
},

'rules': {
'accessor-pairs': 2,
'array-bracket-spacing': 0,
'block-scoped-var': 0,
'brace-style': [2, '1tbs', { 'allowSingleLine': true }],
'camelcase': 0,
'comma-dangle': [2, 'never'],
'comma-spacing': [2, { 'before': false, 'after': true }],
'comma-style': [2, 'last'],
'complexity': 0,
'computed-property-spacing': 0,
'consistent-return': 0,
'consistent-this': 0,
'constructor-super': 2,
'curly': [2, 'multi-line'],
'default-case': 0,
'dot-location': [2, 'property'],
'dot-notation': 0,
'eol-last': 2,
'eqeqeq': [2, 'allow-null'],
'func-names': 0,
'func-style': 0,
'generator-star-spacing': [2, { 'before': true, 'after': false }],
'yield-star-spacing': [2, { 'before': true, 'after': false }],
'guard-for-in': 0,
'indent': [1, 2, { 'SwitchCase': 1 }],
'key-spacing': [2, { 'beforeColon': false, 'afterColon': true }],
'linebreak-style': 0,
'lines-around-comment': 0,
'max-nested-callbacks': 0,
'new-cap': [2, { 'newIsCap': true, 'capIsNew': false }],
'new-parens': 2,
'newline-after-var': 0,
'no-alert': 0,
'no-array-constructor': 2,
'no-caller': 2,
'no-catch-shadow': 0,
'no-cond-assign': 2,
'no-console': 0,
'no-constant-condition': 0,
'no-continue': 0,
'no-control-regex': 2,
'no-debugger': 2,
'no-delete-var': 2,
'no-div-regex': 0,
'no-dupe-args': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-else-return': 0,
'no-empty': 0,
'no-empty-character-class': 2,
'no-eq-null': 0,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': 0,
'no-extra-semi': 0,
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inline-comments': 0,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': 0,
'no-lone-blocks': 2,
'no-lonely-if': 0,
'no-loop-func': 0,
'no-mixed-requires': 0,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 1,
'no-multi-str': 0,
'no-multiple-empty-lines': [1, { 'max': 1 }],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-nested-ternary': 0,
'no-new': 2,
'no-new-func': 0,
'no-new-object': 2,
'no-new-require': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-param-reassign': 0,
'no-path-concat': 0,
'no-process-env': 0,
'no-process-exit': 0,
'no-proto': 0,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-restricted-modules': 0,
'no-return-assign': 2,
'no-script-url': 0,
'no-self-compare': 0,
'no-sequences': 2,
'no-shadow': 0,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-sync': 0,
'no-ternary': 0,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 1,
'no-undef': 2,
'no-undef-init': 2,
'no-undefined': 0,
'no-underscore-dangle': 0,
'no-unexpected-multiline': 2,
'no-unneeded-ternary': 2,
'no-unreachable': 2,
'no-unused-expressions': 0,
'no-unused-vars': [1],
'no-use-before-define': 0,
'no-var': 0,
'no-void': 0,
'no-warning-comments': 0,
'no-with': 2,
'object-curly-spacing': 0,
'object-shorthand': 0,
'one-var': [2, { 'initialized': 'never' }],
'operator-assignment': 0,
'operator-linebreak': [2, 'after', { 'overrides': { '?': 'before', ':': 'before' } }],
'padded-blocks': 0,
'prefer-const': 0,
'quote-props': 0,
'quotes': [2, 'single', 'avoid-escape'],
'radix': 2,
'semi': [2, 'always'],
'semi-spacing': 0,
'sort-vars': 0,
'keyword-spacing': 2,
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, { 'words': true, 'nonwords': false }],
'spaced-comment': [2, 'always', { 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!'] }],
'strict': 0,
'use-isnan': 2,
'valid-jsdoc': 0,
'valid-typeof': 2,
'vars-on-top': 0,
'wrap-iife': [2, 'any'],
'wrap-regex': 0,
'yoda': [2, 'never']
}
};
1 change: 1 addition & 0 deletions vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Changelog
8 changes: 8 additions & 0 deletions vue/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MIT License
Copyright (c) 2014-2019 Cisco Systems, Inc. and/or its affiliated entities

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.
Empty file added vue/README.md
Empty file.
3 changes: 3 additions & 0 deletions vue/components.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"badge": "./src/lib/badge/index.js"
}
113 changes: 113 additions & 0 deletions vue/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"name": "@momentum-ui/vue",
"version": "0.1.0",
"description": "Cisco Momentum UI framework for Vue.js applications",
"author": "Cisco Systems, Inc.",
"main": "lib/momentum-ui.common.js",
"files": [
"src",
"types"
],
"typings": "types/index.d.ts",
"scripts": {
"build:lib": "node tools/bin/build-lib.js",
"build:example": "node tools/bin/build-example.js",
"clean": "rimraf lib",
"deploy:build": "yarn run build:lib",
"dist": "yarn run clean && yarn run build:lib && yarn run lint && webpack --config tools/webpack.conf.js && webpack --config tools/webpack.common.js && webpack --config tools/webpack.component.js",
"lint": "eslint src/**/* --quiet",
"play": "yarn run build:lib && yarn run build:example && cross-env NODE_ENV=development PLAY_ENV=true webpack-dev-server --config tools/webpack.demo.js",
"test": "jest"
},
"homepage": "http://momentum.design",
"repository": {
"type": "git",
"url": "https://github.com/momentum-design/momentum-ui.git"
},
"bugs": {
"url": "https://github.com/momentum-design/momentum-ui/issues"
},
"keywords": [
"Cisco",
"Webex",
"Momentum UI",
"Vue.js"
],
"private": true,
"license": "MIT",
"unpkg": "lib/index.js",
"dependencies": {
"vue": "2.5.21"
},
"devDependencies": {
"@momentum-ui/core": "^15.3.7",
"@momentum-ui/utils": "^6.0.3",
"@vue/component-compiler-utils": "^2.6.0",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^10.0.1",
"babel-jest": "^21.2.0",
"babel-loader": "^7.1.5",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-istanbul": "^4.1.1",
"babel-plugin-module-resolver": "^2.2.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-2": "^6.24.1",
"babel-regenerator-runtime": "^6.5.0",
"copy-webpack-plugin": "^5.0.0",
"cross-env": "^5.2.0",
"css-loader": "^2.1.0",
"eslint": "4.14.0",
"eslint-loader": "^2.0.0",
"eslint-plugin-html": "^4.0.1",
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-node": "^9.1.0",
"file-loader": "^1.1.11",
"file-save": "^0.2.0",
"html-webpack-plugin": "^3.2.0",
"jest": "^23.6.0",
"jest-serializer-vue": "^2.0.2",
"json-loader": "^0.5.7",
"json-templater": "^1.0.4",
"mini-css-extract-plugin": "^0.4.1",
"node-sass": "^4.11.0",
"progress-bar-webpack-plugin": "^1.12.1",
"rimraf": "^2.5.4",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"uppercamelcase": "^1.1.0",
"url-loader": "^1.0.1",
"vue-jest": "^3.0.4",
"vue-loader": "^15.7.0",
"vue-router": "^3.0.1",
"vue-template-compiler": "2.5.21",
"vue-template-es2015-compiler": "^1.6.0",
"webpack": "^4.14.0",
"webpack-cli": "^3.0.8",
"webpack-dev-server": "^3.1.11",
"webpack-node-externals": "^1.7.2",
"yarn": "^1.12.1"
},
"jest": {
"roots": [
"<rootDir>/src/lib/"
],
"moduleFileExtensions": [
"js",
"vue"
],
"moduleNameMapper": {
"^@lib/(.*)$": "<rootDir>/src/lib/$1"
},
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/babel-jest",
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest"
},
"snapshotSerializers": [
"<rootDir>/node_modules/jest-serializer-vue"
]
}
}
Binary file added vue/src/app/favicon.ico
Binary file not shown.
19 changes: 19 additions & 0 deletions vue/src/app/index.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>Playground</title>
</head>
<body>
<script>
if (!window.Promise) {
document.write('<script src="//cdn.jsdelivr.net/npm/es6-promise@4.1.1/dist/es6-promise.min.js"><\/script><script>ES6Promise.polyfill()<\/script>')
}
</script>
<div class="docs-container">
<h1>Welcome to the Momentum UI Toolkit for Vue.js</h1>
</div>
<div id="app"></div>
</body>
</html>
Loading

0 comments on commit 204bed1

Please sign in to comment.