Skip to content

Commit

Permalink
🔥 refactor: update project structures
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Feb 16, 2017
1 parent b450de1 commit a2ec64f
Show file tree
Hide file tree
Showing 74 changed files with 2,833 additions and 2,020 deletions.
10 changes: 10 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"presets": ["es2015", "flow-vue"],
"plugins": ["babel-plugin-espower"],
"env": {
"test": {
"plugins": ["istanbul"],
"presets": ["power-assert"]
}
}
}
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
12 changes: 5 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"root": true,
"parser": "babel-eslint",
"extends": "vue",
"plugins": ["flowtype"],
"rules": {
"complexity": 0,
"object-curly-spacing": ["error", "always"],
"operator-linebreak": [2, "before"],
"no-trailing-spaces": 0,
"no-inline-comments": 0,
"no-multiple-empty-lines": [2, {"max": 2}],
"no-new": 0
"flowtype/define-flow-type": 1,
"flowtype/use-flow-type": 1
}
}
13 changes: 13 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[ignore]
.*/node_modules/.*
.*/docs/.*
.*/test/.*
.*/config/.*
.*/examples/.*

[include]

[libs]
decls

[options]
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Got a question?
The issue list of this repo is **exclusively** for bug reports and feature requests. For simple questions, please use the following resources:
- Read the docs: https://github.com/kazupon/vue-i18n/blob/dev/README.md
- Ask in the Gitter chat room: https://gitter.im/vuejs/vue
- Ask on the forums: http://forum.vuejs.org/
- Look for/ask questions on stack overflow: https://stackoverflow.com/questions/ask?tags=vue-i18n
Expand All @@ -29,7 +28,7 @@ Remove the template from below and provide thoughtful commentary *and code sampl

<!-- BUG REPORT TEMPLATE -->
### vue & vue-i18n version
ex: 1.0.17, 3.1
ex: 2.1.0, 5.0

### Reproduction Link
<!-- A minimal JSBin, JSFiddle, Codepen, or a GitHub reprository that can reproduce the bug. -->
Expand Down
Empty file.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
lib
coverage
dist/*.gz
docs/_book
test/e2e/report
test/e2e/screenshots
node_modules
.DS_Store
*.log
*.gz
*.swp
*~
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
*.log
*.swp
*.yml
bower.json
coverage
docs/_book
config
dist/*.map
lib
Expand Down
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

81 changes: 81 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# vue-i18n Contributing Guide

- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)

## Issue Reporting Guidelines

- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately.

- For more complicated questions, you can use [the official forum](http://forum.vuejs.org/) or StackOverflow. Make sure to provide enough information when asking your questions - this makes it easier for others to help you!

- Try to search for your issue, it may have already been answered or even fixed in the development branch.

- Check if the issue is reproducible with the latest stable version of Vue. If you are using a pre-release, please indicate the specific version you are using.

- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed.

- It is recommended that you make a JSFiddle/JSBin/Codepen to demonstrate your issue. You could start based with [this template](http://jsfiddle.net/5sH6A/) that already includes the latest version of Vue.

- For bugs that involves build setups, you can create a reproduction repository with steps in the README.

- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.

## Pull Request Guidelines

- The `master` branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.**

- Checkout a topic branch from the relevant branch, e.g. `dev`, and merge back against that branch.

- Work in the `src` folder and **DO NOT** checkin `dist` in the commits.

- It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.

- Make sure `npm test` passes. (see [development setup](#development-setup))

- If adding new feature:
- Add accompanying test case.
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.

- If fixing a bug:
- Provide detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.

### Work Step Example
- Fork the repository from [kazupon/vue-i18n](https://github.com/kazupon/vue-i18n) !
- Create your topic branch from `dev`: `git branch my-new-topic origin/dev`
- Add codes and pass tests !
- Commit your changes: `git commit -am 'Add some topic'`
- Push to the branch: `git push origin my-new-topic`
- Submit a pull request to `dev` branch of `kazupon/vue-i18n` repository !

## Development Setup

You will need [Node.js](http://nodejs.org) and [Java Runtime Environment](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (needed for running Selenium server during e2e tests).

After cloning the repo, run:

$ npm install

### Commonly used NPM scripts

# watch and serve with hot reload unit test at localhost:8080
$ npm run dev

# lint source codes
$ npm run lint

# run unit tests in browser (firefox/safari/chrome)
$ npm run test:unit

# build all dist files, including npm packages
$ npm run build

# run the full test suite, include linting / type checking
$ npm test

There are some other scripts available in the `scripts` section of the `package.json` file.

The default test script will do the following: lint with ESLint -> type check with Flow -> unit tests with coverage -> e2e tests. **Please make sure to have this pass successfully before submitting a PR.** Although the same tests will be run against your PR on the CI server, it is better to have it working locally beforehand.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 kazuya kawaguchi
Copyright (c) 2016 kazuya kawaguchi

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
Expand Down
41 changes: 10 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,31 @@
# vue-i18n

[![Build Status](https://travis-ci.org/kazupon/vue-i18n.svg?branch=master)](https://travis-ci.org/kazupon/vue-i18n)
[![Coverage Status](https://img.shields.io/coveralls/kazupon/vue-i18n.svg)](https://coveralls.io/r/kazupon/vue-i18n?branch=master)
[![Build Status](https://circleci.com/gh/kazupon/vue-i18n/tree/dev?style=shield)](https://circleci.com/gh/kazupon/vue-i18n/tree/dev)
[![Coverage Status](https://codecov.io/gh/kazupon/vue-i18n/branch/dev/graph/badge.svg)](https://codecov.io/gh/kazupon/vue-i18n)
[![NPM version](https://badge.fury.io/js/vue-i18n.svg)](http://badge.fury.io/js/vue-i18n)
[![Sauce Test Status](https://saucelabs.com/buildstatus/vue-i18n)](https://saucelabs.com/u/vue-i18n)


Internationalization plugin for Vue.js

## :book: Documentation

Docs are available [here](https://kazupon.github.io/vue-i18n).


## :muscle: Contributing
- Fork it !
- Create your top branch from `dev`: `git branch my-new-topic origin/dev`
- Commit your changes: `git commit -am 'Add some topic'`
- Push to the branch: `git push origin my-new-topic`
- Submit a pull request to `dev` branch of `kazupon/vue-i18n` repository !

## :book: Documentation

## :hammer: Development Setup
See [here](http://kazupon.github.io/vue-i18n/)

```shell
# install deps
npm install

# build dist files
npm run build
## :scroll: Changelog

# lint
npm run lint
Details changes for each release are documented in the [CHANGELOG.md](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md).

# run unit tests only
npm run unit

# run e2e tests only
npm run e2e
## :exclamation: Issues

# lint & run all tests
npm test
```
Please make sure to read the [Issue Reporting Checklist](https://github.com/kazupon/vue-i18n/blob/dev/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.


## :scroll: Changelog
## :muscle: Contribution

Change details for each release are documented in [CHANGELOG.md](https://github.com/kazupon/vue-i18n/blob/dev/CHANGELOG.md).
Please make sure to read the [Contributing Guide](https://github.com/kazupon/vue-i18n/blob/dev/CONTRIBUTING.md) before making a pull request.


## :copyright: License
Expand Down
6 changes: 6 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
machine:
node:
version: 6
test:
post:
- npm run coverage && bash <(curl -s https://codecov.io/bash)
1 change: 0 additions & 1 deletion config/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
},
"extends": "vue",
"rules": {
"operator-linebreak": [2, "before"],
"no-multiple-empty-lines": [2, {"max": 2}],
"no-console": 0
}
Expand Down
14 changes: 8 additions & 6 deletions config/banner.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
var pack = require('../package.json')
var version = process.env.VERSION || pack.version
const pack = require('../package.json')
const version = process.env.VERSION || pack.version

module.exports = '/*!\n' + ' * ' + pack.name + ' v' + version + '\n'
+ ' * (c) ' + new Date().getFullYear() + ' ' + pack.author.name + '\n'
+ ' * Released under the ' + pack.license + ' License.\n'
+ ' */'
module.exports =
'/*!\n' +
` * ${pack.name} v${version} \n` +
` * (c) ${new Date().getFullYear()} ${pack.author.name}\n` +
` * Released under the ${pack.license} License.\n` +
' */'
Loading

0 comments on commit a2ec64f

Please sign in to comment.