├── .babelrc ├── .editorconfig ├── .eslintrc ├── .gitignore ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── src ├── app.vue ├── main.js ├── pages │ ├── about.vue │ ├── dynamic-route.vue │ ├── form.vue │ ├── home.vue │ ├── not-found.vue │ ├── panel-left.vue │ └── panel-right.vue └── routes.js └── www ├── .gitkeep ├── css ├── app.css └── icons.css ├── index.html └── js └── .keep /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["es2015"], 4 | "stage-2" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | .root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "standard", 3 | "plugins": [ 4 | "html" 5 | ], 6 | "env": { 7 | "jasmine": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | www/js/build.js 4 | www/fonts 5 | www/css/build.css 6 | www/css/framework7.css 7 | www/css/framework7.min.css 8 | 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Vladimir Kharlampidi 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. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ⛔️ DEPRECATED 2 | 3 | **This repo is deprecated and not mainted any more. Use [Framework7-CLI](https://framework7.io/cli/) instead. Please, don't open new issues and don't send any PRs to this repository** 4 | 5 | # Framework7 Vue Browserify Template 6 | Framework7 Vue with Browserify starter app template with hot-reload & css extraction. Based on [Vue Browserify Boilerplate](https://github.com/vuejs-templates/browserify) 7 | 8 | ## Usage 9 | 10 | ### 1. Download this repository 11 | ``` 12 | git clone https://github.com/framework7io/framework7-template-vue-browserify my-app 13 | ``` 14 | 15 | Repository will be downloaded into `my-app/` folder 16 | 17 | ### 2. Instal dependencies 18 | 19 | Go to the downloaded repository folder and run: 20 | ``` 21 | npm install 22 | ``` 23 | 24 | This will download latest version of Framework7, Framework7-Vue, Vue and required icon fonts (to `/www/fonts/`) 25 | 26 | ### 3. Run the app 27 | 28 | ``` 29 | npm run serve 30 | ``` 31 | 32 | App will be opened in browser at `http://localhost:8080/` 33 | 34 | ### 4. Build app for production 35 | 36 | ``` 37 | npm run build 38 | ``` 39 | 40 | The output will be at `www/` folder 41 | 42 | ## Use with cordova 43 | 44 | Just put the contents of `www` folder in your cordova's project root `www` folder 45 | 46 | ## One command install 47 | 48 | ``` 49 | git clone https://github.com/framework7io/framework7-template-vue-browserify my-app && 50 | cd my-app && 51 | npm install && 52 | npm run dev 53 | ``` 54 | 55 | ## Build Setup 56 | 57 | ``` bash 58 | # install dependencies 59 | npm install 60 | 61 | # serve with hot reload at localhost:8080 62 | npm run dev 63 | 64 | # build for production with minification 65 | npm run build 66 | ``` 67 | 68 | ## Project Structure 69 | 70 | * `src/components` - folder with custom `.vue` components 71 | * `src/pages` - app `.vue` pages 72 | * `src/main.js` - main app file where you include/import all required libs and init app 73 | * `src/routes.js` - app routes 74 | * `src/app.vue` - main app structure/component 75 | * `www/css` - app styles, put custom app CSS styles here as well 76 | * `www/css/build.css` - Vue components styles will be extracted here on `npm run build` 77 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "framework7-template-vue-browserify", 3 | "version": "2.0.0", 4 | "description": "Framework7 Vue with Browserify starter app template with hot-reload & css extraction", 5 | "repository": { 6 | "type": "git", 7 | "url": "git+https://github.com/framework7io/framework7-template-vue-browserify.git" 8 | }, 9 | "keywords": [ 10 | "ios", 11 | "browserify", 12 | "framework7", 13 | "f7", 14 | "vue", 15 | "vuejs", 16 | "material", 17 | "mobile", 18 | "app" 19 | ], 20 | "author": "Vladimir Kharlampidi", 21 | "license": "MIT", 22 | "bugs": { 23 | "url": "https://github.com/framework7io/framework7-template-vue-browserify/issues" 24 | }, 25 | "homepage": "http://framework7.io/vue/", 26 | "scripts": { 27 | "watchify": "watchify -vd -p browserify-hmr -e src/main.js -o www/js/build.js", 28 | "serve": "http-server ./www/ -o -c 1 -a localhost", 29 | "dev": "npm-run-all --parallel watchify serve", 30 | "build": "cross-env NODE_ENV=production browserify -g envify -p [ vueify/plugins/extract-css -o www/css/build.css ] -e src/main.js | uglifyjs -c warnings=false -m > www/js/build.js", 31 | "copy-f7": "cpy node_modules/framework7/dist/css/framework7.css www/css && cpy node_modules/framework7/dist/css/framework7.min.css www/css && cpy node_modules/framework7-icons/fonts/*.* www/fonts && cpy node_modules/material-design-icons/iconfont/*.{eot,ttf,woff,woff2} www/fonts", 32 | "postinstall": "npm run copy-f7" 33 | }, 34 | "browser": { 35 | "vue": "vue/dist/vue.common.js" 36 | }, 37 | "browserify": { 38 | "transform": [ 39 | [ 40 | "babelify", 41 | { 42 | "presets": [ 43 | "es2015" 44 | ] 45 | } 46 | ], 47 | "vueify" 48 | ] 49 | }, 50 | "dependencies": { 51 | "framework7": "^2.2.5", 52 | "framework7-icons": "^0.8.9", 53 | "framework7-vue": "^2.2.5", 54 | "material-design-icons": "^3.0.1", 55 | "vue": "^2.5.2" 56 | }, 57 | "devDependencies": { 58 | "babel-core": "^6.22.1", 59 | "babel-plugin-transform-runtime": "^6.22.0", 60 | "babel-preset-es2015": "^6.24.1", 61 | "babel-preset-stage-2": "^6.22.0", 62 | "babel-runtime": "^6.0.0", 63 | "babelify": "^8.0.0", 64 | "browserify": "^15.2.0", 65 | "browserify-hmr": "^0.3.6", 66 | "cpy-cli": "^1.0.1", 67 | "cross-env": "^2.0.0", 68 | "envify": "^4.1.0", 69 | "http-server": "^0.11.1", 70 | "npm-run-all": "^2.3.0", 71 | "proxyquireify": "^3.0.1", 72 | "uglify-js": "^2.5.0", 73 | "vueify": "^9.4.1", 74 | "watchify": "^3.10.0" 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/app.vue: -------------------------------------------------------------------------------- 1 | 62 | 63 | 66 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // Import Vue 2 | import Vue from 'vue'; 3 | 4 | // Import F7 5 | import Framework7 from 'framework7/dist/js/framework7.js'; 6 | 7 | // Import F7 Vue Plugin 8 | import Framework7Vue from 'framework7-vue/dist/framework7-vue.js'; 9 | 10 | // Import Routes 11 | import Routes from './routes.js'; 12 | 13 | // Import App Component 14 | import App from './app.vue'; 15 | 16 | // Init F7 Vue Plugin 17 | Vue.use(Framework7Vue, Framework7); 18 | 19 | // Init App 20 | new Vue({ 21 | el: '#app', 22 | template: '', 23 | // Init Framework7 by passing parameters here 24 | framework7: { 25 | id: 'io.framework7.testapp', // App bundle ID 26 | name: 'Framework7', // App name 27 | theme: 'auto', // Automatic theme detection 28 | // App routes 29 | routes: Routes, 30 | }, 31 | // Register App Component 32 | components: { 33 | app: App 34 | } 35 | }); 36 | -------------------------------------------------------------------------------- /src/pages/about.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | -------------------------------------------------------------------------------- /src/pages/dynamic-route.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /src/pages/form.vue: -------------------------------------------------------------------------------- 1 | 103 | 104 | 107 | -------------------------------------------------------------------------------- /src/pages/home.vue: -------------------------------------------------------------------------------- 1 | 52 | 55 | -------------------------------------------------------------------------------- /src/pages/not-found.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/pages/panel-left.vue: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /src/pages/panel-right.vue: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /src/routes.js: -------------------------------------------------------------------------------- 1 | import HomePage from './pages/home.vue'; 2 | import AboutPage from './pages/about.vue'; 3 | import FormPage from './pages/form.vue'; 4 | import DynamicRoutePage from './pages/dynamic-route.vue'; 5 | import NotFoundPage from './pages/not-found.vue'; 6 | 7 | import PanelLeftPage from './pages/panel-left.vue'; 8 | import PanelRightPage from './pages/panel-right.vue'; 9 | 10 | export default [ 11 | { 12 | path: '/', 13 | component: HomePage, 14 | }, 15 | { 16 | path: '/panel-left/', 17 | component: PanelLeftPage, 18 | }, 19 | { 20 | path: '/panel-right/', 21 | component: PanelRightPage, 22 | }, 23 | { 24 | path: '/about/', 25 | component: AboutPage, 26 | }, 27 | { 28 | path: '/form/', 29 | component: FormPage, 30 | }, 31 | { 32 | path: '/dynamic-route/blog/:blogId/post/:postId/', 33 | component: DynamicRoutePage, 34 | }, 35 | { 36 | path: '(.*)', 37 | component: NotFoundPage, 38 | }, 39 | ]; 40 | -------------------------------------------------------------------------------- /www/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/framework7io/framework7-template-vue-browserify/325699a0b0f1f6c664caab260f8b768ea95047c2/www/.gitkeep -------------------------------------------------------------------------------- /www/css/app.css: -------------------------------------------------------------------------------- 1 | /* Your app styles here */ 2 | -------------------------------------------------------------------------------- /www/css/icons.css: -------------------------------------------------------------------------------- 1 | /* Material Icons Font (for MD theme) */ 2 | @font-face { 3 | font-family: 'Material Icons'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: url(../fonts/MaterialIcons-Regular.eot); /* For IE6-8 */ 7 | src: local('Material Icons'), 8 | local('MaterialIcons-Regular'), 9 | url(../fonts/MaterialIcons-Regular.woff2) format('woff2'), 10 | url(../fonts/MaterialIcons-Regular.woff) format('woff'), 11 | url(../fonts/MaterialIcons-Regular.ttf) format('truetype'); 12 | } 13 | 14 | .material-icons { 15 | font-family: 'Material Icons'; 16 | font-weight: normal; 17 | font-style: normal; 18 | font-size: 24px; /* Preferred icon size */ 19 | display: inline-block; 20 | line-height: 1; 21 | text-transform: none; 22 | letter-spacing: normal; 23 | word-wrap: normal; 24 | white-space: nowrap; 25 | direction: ltr; 26 | 27 | /* Support for all WebKit browsers. */ 28 | -webkit-font-smoothing: antialiased; 29 | /* Support for Safari and Chrome. */ 30 | text-rendering: optimizeLegibility; 31 | 32 | /* Support for Firefox. */ 33 | -moz-osx-font-smoothing: grayscale; 34 | 35 | /* Support for IE. */ 36 | font-feature-settings: 'liga'; 37 | } 38 | 39 | /* Framework7 Icons Font (for iOS theme) */ 40 | @font-face { 41 | font-family: 'Framework7 Icons'; 42 | font-style: normal; 43 | font-weight: 400; 44 | src: url("../fonts/Framework7Icons-Regular.eot"); 45 | src: url("../fonts/Framework7Icons-Regular.woff2") format("woff2"), 46 | url("../fonts/Framework7Icons-Regular.woff") format("woff"), 47 | url("../fonts/Framework7Icons-Regular.ttf") format("truetype"); 48 | } 49 | 50 | .f7-icons { 51 | font-family: 'Framework7 Icons'; 52 | font-weight: normal; 53 | font-style: normal; 54 | font-size: 25px; 55 | line-height: 1; 56 | letter-spacing: normal; 57 | text-transform: none; 58 | display: inline-block; 59 | white-space: nowrap; 60 | word-wrap: normal; 61 | direction: ltr; 62 | -webkit-font-smoothing: antialiased; 63 | text-rendering: optimizeLegibility; 64 | -moz-osx-font-smoothing: grayscale; 65 | -webkit-font-feature-settings: "liga"; 66 | -moz-font-feature-settings: "liga=1"; 67 | -moz-font-feature-settings: "liga"; 68 | font-feature-settings: "liga"; 69 | text-align: center; 70 | } 71 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | My App 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /www/js/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/framework7io/framework7-template-vue-browserify/325699a0b0f1f6c664caab260f8b768ea95047c2/www/js/.keep --------------------------------------------------------------------------------