Skip to content

Commit

Permalink
feat(refactor): refactor module's code
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Route generation utils have been renamed & the module doesn't register a vuex module anymore

- Replace all calls to getLocalizedRoute() with localePath()
- Replace all calls to getSwitchLocaleRoute() with switchLocalePath()
- Configured locales are now accessible in any component via `$i18n.locales`
- Similarly, default app locale can be accessed via `i18n.defaultLocale`
  • Loading branch information
paulgv committed Dec 5, 2017
1 parent 93a2b32 commit e4186dc
Show file tree
Hide file tree
Showing 19 changed files with 7,255 additions and 807 deletions.
29 changes: 29 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: 2
jobs:
build:
working_directory: /usr/src/app
docker:
- image: banian/node
steps:
# Checkout repository
- checkout

# Restore cache
- restore_cache:
key: yarn-{{ checksum "yarn.lock" }}

# Install dependencies
- run:
name: Install Dependencies
command: NODE_ENV=dev yarn

# Keep cache
- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- "node_modules"

# Test
- run:
name: Tests
command: yarn test && yarn codecov
Empty file modified .editorconfig
100644 → 100755
Empty file.
31 changes: 29 additions & 2 deletions .eslintrc.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
module.exports = {
"extends": "standard"
};
root: true,
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
node: true,
jest: true
},
extends: 'standard',
plugins: [
'jest',
'vue'
],
rules: {
// Allow paren-less arrow functions
'arrow-parens': 0,
// Allow async-await
'generator-star-spacing': 0,
// Allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
// Do not allow console.logs etc...
'no-console': 2
},
globals: {
'jest/globals': true,
jasmine: true
}
}
93 changes: 8 additions & 85 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,86 +1,9 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
node_modules
*.iml
.idea
*.log*
.nuxt
.vscode
.DS_STORE
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
dist
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Paul Gascou-Vaillancourt
Copyright (c) Paul Gascou-Vaillancourt (@paulgv)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit e4186dc

Please sign in to comment.