Skip to content

Commit 09f2d80

Browse files
author
Pooya Parsa
committed
feat(package): use official releases for f7
1 parent c586499 commit 09f2d80

File tree

3 files changed

+406
-386
lines changed

3 files changed

+406
-386
lines changed

Diff for: lib/module.js

+7-9
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ const defaults = {
2323
const resolvePath = (...args) => resolve(__dirname, ...args)
2424
const resolveDep = p => require.resolve(p)
2525

26-
const PREFIX = '@pi0/'
27-
2826
module.exports = function nuxt7 (moduleOptions) {
2927
const options = defaultsDeep({}, moduleOptions, this.options.framework7, defaults)
3028
const cloneOptions = () => cloneDeep(options)
3129

32-
// mode
30+
// Router Mode
3331
if (options.mode === 'history') {
3432
options.view.pushStateSeparator = '__window.location.origin ? \'\' : \'#\'__'
3533
options.view.pushStateRoot = '__window.location.origin__'
@@ -45,14 +43,14 @@ module.exports = function nuxt7 (moduleOptions) {
4543
this.extendBuild(config => extendConfig(config, options))
4644

4745
// Force add F7 dependencies to common chunk
48-
this.addVendor(`${PREFIX}framework7`)
49-
this.addVendor(`${PREFIX}framework7-vue`)
46+
this.addVendor(`framework7`)
47+
this.addVendor(`framework7-vue`)
5048
this.addVendor('dom7')
5149
this.addVendor('template7')
5250

5351
// Framework7 css files
5452
if (options.css) {
55-
this.options.css.push(resolveDep(`${PREFIX}framework7/dist/css/framework7${options.rtl ? '.rtl' : ''}.css`))
53+
this.options.css.push(resolveDep(`framework7/dist/css/framework7${options.rtl ? '.rtl' : ''}.css`))
5654
}
5755
delete options.css
5856

@@ -133,14 +131,14 @@ function extendConfig (config, options) {
133131

134132
// Don't exclude babel for F7 stuff
135133
const babelLoader = config.module.rules.find(r => r.loader === 'babel-loader')
136-
babelLoader.exclude = /node_modules\/(?!(@pi0\/framework7|@pi0\/framework7-vue|template7|dom7)\/).*/
134+
babelLoader.exclude = /node_modules\/(?!(framework7|framework7-vue|template7|dom7)\/).*/
137135

138136
// Disable warning for babel on framework7 dist files
139137
babelLoader.options.compact = false
140138

141139
// framework7
142-
config.resolve.alias['framework7'] = resolveDep(`${PREFIX}framework7/dist/js/framework7.esm.bundle.js`)
140+
config.resolve.alias['framework7'] = resolveDep(`framework7/dist/js/framework7.esm.bundle.js`)
143141

144142
// framework7-vue
145-
config.resolve.alias['framework7-vue'] = resolveDep(`${PREFIX}framework7-vue/dist/framework7-vue.esm.js`)
143+
config.resolve.alias['framework7-vue'] = resolveDep(`framework7-vue/dist/framework7-vue.esm.js`)
146144
}

Diff for: package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
},
2323
"dependencies": {
2424
"@nuxtjs/pwa": "^1.0.2",
25-
"@pi0/framework7": "^2.0.0-beta.9",
26-
"@pi0/framework7-vue": "^2.0.0-beta.1.5",
25+
"framework7": "^2.0.0-beta.15",
26+
"framework7-vue": "^2.0.0-beta.4",
2727
"framework7-icons": "^0.8.9",
2828
"lodash": "^4.17.4",
2929
"nuxt": "^1.0.0-rc11"
@@ -32,15 +32,15 @@
3232
"lib"
3333
],
3434
"devDependencies": {
35-
"eslint": "^4.8.0",
35+
"eslint": "^4.10.0",
3636
"eslint-config-standard": "^10.2.1",
3737
"eslint-plugin-html": "^3.2.2",
38-
"eslint-plugin-import": "^2.7.0",
39-
"eslint-plugin-node": "^5.2.0",
40-
"eslint-plugin-promise": "^3.5.0",
38+
"eslint-plugin-import": "^2.8.0",
39+
"eslint-plugin-node": "^5.2.1",
40+
"eslint-plugin-promise": "^3.6.0",
4141
"eslint-plugin-standard": "^3.0.1",
4242
"husky": "^0.14.3",
43-
"lint-staged": "^4.2.3",
43+
"lint-staged": "^4.3.0",
4444
"standard-version": "^4.2.0",
4545
"surge": "^0.19.0"
4646
}

0 commit comments

Comments
 (0)