-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle using Webpack #4692
Merged
Merged
Bundle using Webpack #4692
Changes from 35 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
e372d42
try webpack
OmgImAlexis 0db1368
ignore dist
OmgImAlexis e07cd20
remove dist files
OmgImAlexis 4cac4ae
fix type checking
OmgImAlexis ea6a194
lint
OmgImAlexis 5e3abbe
add webpack to gulp
OmgImAlexis 8db6030
sync themes
OmgImAlexis f46f5e5
try and fix pages loading via .vue files
OmgImAlexis 97d001c
Merge branch 'develop' into feature/webpack
sharkykh 85474f8
Fix assets
sharkykh cc828b0
Fix x-template components
sharkykh dc3b0a8
Fix toggle button
sharkykh a500a3d
Fix AsyncComputed
sharkykh 130b075
Enable Vue-DevTools
sharkykh e3a2065
Spread operator in object literals is experimental
sharkykh 3eba342
Ignore non-browser files in gulp tasks
sharkykh 9966f30
Merge branch 'develop' into feature/webpack
sharkykh c33f77f
Pin dependencies + update webpack-cli
sharkykh d29bb92
Remove unused libraries
sharkykh ab96922
Move Snotify to webpack
sharkykh 84605c7
Remove unused vendors files
sharkykh 653c1d4
Fix VueMeta
sharkykh 227d94a
Fix apibuilder
sharkykh 0f98e3d
Update gulpfile
sharkykh e866a8c
Webpack optimization
sharkykh f3a8bd1
Fix notification from store
sharkykh 049a833
Add `?${sbPID}`
sharkykh 4fa70c3
Update changelog
sharkykh 7dd9f76
Merge branch 'develop' into feature/webpack
sharkykh 22c2490
Update script
sharkykh 5597b76
fix cp not running
OmgImAlexis 3fe8057
Fix optimization
sharkykh 2a10205
Merge branch 'develop' into feature/webpack
sharkykh 6ee5539
add cp to webpack
OmgImAlexis b7cb19b
add vue-loader
OmgImAlexis b8fa67c
pin deps
OmgImAlexis e144fc3
Merge branch 'develop' into feature/webpack
sharkykh d1913fb
Merge branch 'develop' into feature/webpack
sharkykh ef251b7
Merge branch 'develop' into feature/webpack
sharkykh d6c7b0b
Better components registration
sharkykh c709c0b
Read themes from `package.json`
sharkykh 2344421
Clear ./dist/js before build
sharkykh cbb82b8
Remove webpack-stream
sharkykh 6bc2deb
Make sure webpack is built in production mode for the time being
sharkykh eff86d6
Re-enable `webpack.config.js` linting
sharkykh bccf95c
eslint-plugin-unicorn is part of XO
sharkykh d2c14d5
remove globby (unused)
sharkykh fab69f4
upgrade webpack
sharkykh 56f6676
Fix vue-loader production mode
sharkykh 99a464b
Disable webpack build for now
sharkykh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.nyc_output | ||
coverage | ||
coverage.lcov | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import Vue from 'vue'; | ||
import Vuex, { mapState } from 'vuex'; | ||
import VueRouter from 'vue-router'; | ||
import AsyncComputed from 'vue-async-computed'; | ||
import ToggleButton from 'vue-js-toggle-button'; | ||
import Snotify from 'vue-snotify'; | ||
import store from './store'; | ||
import router from './router'; | ||
import AppHeader from './templates/app-header.vue'; | ||
import ScrollButtons from './templates/scroll-buttons.vue'; | ||
import AppLink from './templates/app-link.vue'; | ||
import Asset from './templates/asset.vue'; | ||
import FileBrowser from './templates/file-browser.vue'; | ||
import PlotInfo from './templates/plot-info.vue'; | ||
import LanguageSelect from './templates/language-select.vue'; | ||
import RootDirs from './templates/root-dirs.vue'; | ||
import Backstretch from './templates/backstretch.vue'; | ||
|
||
Vue.config.devtools = true; | ||
Vue.config.performance = true; | ||
|
||
Vue.use(Vuex); | ||
Vue.use(VueRouter); | ||
Vue.use(AsyncComputed); | ||
Vue.use(ToggleButton); | ||
Vue.use(Snotify); | ||
|
||
// Load x-template components | ||
window.components.forEach(component => { | ||
console.log(`Registering ${component.name}`); | ||
Vue.component(component.name, component); | ||
}); | ||
|
||
// Global components | ||
Vue.component('app-header', AppHeader); | ||
Vue.component('scroll-buttons', ScrollButtons); | ||
Vue.component('app-link', AppLink); | ||
Vue.component('asset', Asset); | ||
Vue.component('file-browser', FileBrowser); | ||
Vue.component('plot-info', PlotInfo); | ||
Vue.component('language-select', LanguageSelect); | ||
Vue.component('root-dirs', RootDirs); | ||
Vue.component('backstretch', Backstretch); | ||
|
||
const app = new Vue({ | ||
name: 'App', | ||
store, | ||
router, | ||
data() { | ||
return { | ||
globalLoading: false | ||
}; | ||
}, | ||
computed: Object.assign(mapState(['auth', 'config']), {}), | ||
mounted() { | ||
console.log('App Mounted!'); | ||
|
||
const { $store } = this; | ||
$store.dispatch('login', { username: window.username }); | ||
$store.dispatch('getConfig'); | ||
|
||
console.log('App Loaded!'); | ||
} | ||
}).$mount('#vue-wrap'); | ||
|
||
export default app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import Vue from 'vue'; | ||
import Vuex from 'vuex'; | ||
import VueMeta from 'vue-meta'; | ||
import VueRouter from 'vue-router'; | ||
import VueNativeSock from 'vue-native-websocket'; | ||
import VueInViewportMixin from 'vue-in-viewport-mixin'; | ||
import AsyncComputed from 'vue-async-computed'; | ||
import ToggleButton from 'vue-js-toggle-button'; | ||
import Snotify from 'vue-snotify'; | ||
import axios from 'axios'; | ||
import httpVueLoader from 'http-vue-loader'; | ||
import store from './store'; | ||
import router from './router'; | ||
import { apiRoute, apiv1, api } from './api'; | ||
|
||
if (window) { | ||
// Adding libs to window so mako files can use them | ||
window.Vue = Vue; | ||
window.Vuex = Vuex; | ||
window.VueMeta = VueMeta; | ||
window.VueRouter = VueRouter; | ||
window.VueNativeSock = VueNativeSock; | ||
window.VueInViewportMixin = VueInViewportMixin; | ||
window.AsyncComputed = AsyncComputed; | ||
window.ToggleButton = ToggleButton; | ||
window.Snotify = Snotify; | ||
window.axios = axios; | ||
window.httpVueLoader = httpVueLoader; | ||
window.store = store; | ||
window.router = router; | ||
window.apiRoute = apiRoute; | ||
window.apiv1 = apiv1; | ||
window.api = api; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this as
yarn gulp
is the same even if you don't have this.