Skip to content

Commit cbfddd1

Browse files
🎉 Initial commit
0 parents  commit cbfddd1

File tree

11 files changed

+7933
-0
lines changed

11 files changed

+7933
-0
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/build/
2+
/dist/
3+
/*.js

.eslintrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
root: true,
3+
parserOptions: {
4+
parser: 'babel-eslint',
5+
ecmaVersion: 2017,
6+
sourceType: 'module',
7+
},
8+
extends: ['airbnb-base', 'plugin:vue/recommended'],
9+
// required to lint *.vue files
10+
plugins: ['vue'],
11+
rules: {
12+
'vue/require-default-prop': 0,
13+
},
14+
};

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: node_js
2+
node_js:
3+
- stable
4+
install:
5+
- npm install
6+
script:
7+
- npm test

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Vinayak
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

build/rollup.conf.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import babel from 'rollup-plugin-babel';
2+
import vue from 'rollup-plugin-vue';
3+
4+
export default {
5+
input: 'src/index.js',
6+
plugins: [vue(), babel()],
7+
output: [
8+
{
9+
format: 'umd',
10+
name: 'VueIntlNumberformat',
11+
file: 'dist/vue-intl-numberformat.js',
12+
},
13+
{
14+
format: 'es',
15+
file: 'dist/vue-intl-numberformat.esm.js',
16+
},
17+
],
18+
};

build/rollup.conf.min.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import babel from 'rollup-plugin-babel';
2+
import uglify from 'rollup-plugin-uglify';
3+
import vue from 'rollup-plugin-vue';
4+
5+
export default {
6+
input: 'src/index.js',
7+
plugins: [vue(), babel(), uglify()],
8+
output: {
9+
format: 'umd',
10+
name: 'VueIntlNumberformat',
11+
file: 'dist/vue-intl-numberformat.min.js',
12+
},
13+
};

karma.conf.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Karma configuration
2+
module.exports = function(config) {
3+
config.set({
4+
// base path that will be used to resolve all patterns (eg. files, exclude)
5+
basePath: '',
6+
7+
// frameworks to use
8+
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
9+
frameworks: ['jasmine', 'browserify'],
10+
11+
// list of files / patterns to load in the browser
12+
files: ['test/**/*.js'],
13+
14+
// list of files to exclude
15+
exclude: [],
16+
17+
// preprocess matching files before serving them to the browser
18+
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
19+
preprocessors: {
20+
'test/**/*.spec.js': ['browserify'],
21+
},
22+
23+
// test results reporter to use
24+
// possible values: 'dots', 'progress'
25+
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
26+
reporters: ['spec'],
27+
28+
// web server port
29+
port: 9876,
30+
31+
// enable / disable colors in the output (reporters and logs)
32+
colors: true,
33+
34+
// level of logging
35+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
36+
logLevel: config.LOG_INFO,
37+
38+
// enable / disable watching file and executing tests whenever any file changes
39+
autoWatch: true,
40+
41+
// start these browsers
42+
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
43+
browsers: ['PhantomJS'],
44+
45+
// Continuous Integration mode
46+
// if true, Karma captures browsers, runs the tests and exits
47+
singleRun: true,
48+
49+
// Browserify config
50+
browserify: {
51+
transform: [
52+
['babelify', { presets: ['env'] }],
53+
[
54+
'aliasify',
55+
{
56+
aliases: {
57+
vue: 'vue/dist/vue.js',
58+
'vue-intl-numberformat': './dist/vue-intl-numberformat.js',
59+
},
60+
},
61+
],
62+
],
63+
debug: true,
64+
},
65+
});
66+
};

0 commit comments

Comments
 (0)