Comments (12)
Your crossed out text is correct. The theme.htm
file is like your layout, and the .vue
files are what hold your actual content.
Sorry to hear that the learning curve was too high for you, I see how it can be a lot to take in at once. Hopefully soon I'll make some screencasts to go with this theme.
from vuetober.
Yes and no. You can't prevent the webpack assets directory from being cleared, because it needs to kill off old assets. But you can change the directory that webpack is using by modifying these lines
If you just append /spa
or whatever onto the end of that, it should create a nice isolated area for your webpack assets to live.
from vuetober.
Yes, this should be possible by modifying the theme.htm
file. By default, it is set up to catch all routes, but you could change it to read /dashboard/:all?*
to catch only your dashboard urls.
https://github.com/scottbedard/oc-vuetober-theme/blob/master/template/src/theme.htm#L2
Outside of that, just use normal October layouts, pages, partials, etc...
from vuetober.
To do that i should also copy the pages, layouts, partials and assets folders from our main theme to this one in the folder /themes/SPA/src/
right (or the other way around)?
And, i will still be able to manage the pages from the CMS right?
from vuetober.
Either or, it doesn't really matter. I would recommend doing it the way you mentioned though so you don't have to mess with any of the build configuration.
And yes, for any of the non-spa pages, you'll be able to edit them the same way you normally would.
from vuetober.
I'm just having a problem right now.
I changed the root.vue file and the pages in the pages folder in /themes/my-theme/src
but it is still showing me the intro page when i visit the url i set.
Are there any other files i need to remove/edit that i can't find?
from vuetober.
You shouldn't have to change the root.vue
file to achieve what you're after. Simply changing the url
property of /src/theme.htm
should do it.
Once this is done, you'll need to rebuild your theme with the following command.
$ npm run build
from vuetober.
Oh ok, i got it to work now, thanks. (I'm still new to this suff)
Just to make sure, now to work on my app i just need to work on the pages/theme.htm
file right? (I can edit it in the october CMS)
Nevermind, i've been reading how vue-loader works and i think i got it. The layout of my app can be in the pages/theme.htm
file and the app it self should be in pages in /themes/my-theme/src/pages
and to make everything work i just need to setup the routes.js
right?
I have to give up on this... It's too hard for an 18 year old without a teacher :P Thanks anyway for the help
from vuetober.
Quick question that i couldn't quite figure out on my own before:
Is there a way to prevent the folder /themes/my-theme/assets
from being cleared when we run the command $ npm run build
since the other pages that are not from vue use that folder to retrieve other assets besides the ones that vue
uses with webpack
?
from vuetober.
I did that and ran $ npm run build
he still cleared the assets folder and created a folder named "pages" with the theme.htm inside
from vuetober.
Creating the /pages/theme.htm
is required. You can name that file anything you want, but your SPA still needs a single entry point, which is what that file provides.
https://github.com/scottbedard/oc-vuetober-theme/blob/master/template/build/webpack.prod.conf.js#L56
As for clearing out the /assets
folder, you changed the output directory and it's still clearing it? Something might be messed up in your build config, because it's set up to only clear the directly it's outputting to.
from vuetober.
Changing the path doesn't prevent the folder assets
from being deleted. I even tried renaming the folder in the config to assets_spa
an create an empty folder names assets
but it still deleted the folder assets
and created another folder named assets_spa
from vuetober.
Related Issues (20)
- Only allow cors requests in development
- Use generator api to extend vue configuration
- Dev entry point url is hard coded
- Add validation to application url prompt
- Create dev entry point as .ts file if typescript is being used
- Improve error messaging when production assets haven't been built
- Image asset urls are not correct in built files
- 3.0 Release HOT 4
- Configure api proxying, and fix session support on development server HOT 1
- Yarn run dev hangs the browser down HOT 2
- Instructions do not yield a working app HOT 4
- Global component not working HOT 2
- Dev server not rendering anything HOT 6
- Resources fail to load HOT 2
- How to change the devServer host HOT 2
- Any way to have two entry points? HOT 1
- Failed to decode param. HOT 3
- Does not work on windows - keeps full path which breaks it HOT 1
- 4.0 Brainstorming
- Failed Yarn Serve
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuetober.