Generate a project from fountainJS
https://github.com/FountainJS/generator-fountain-webapp
yo fountain-webapp
Use following settings
Which JavaScript framework do you want? Angular 1
Which module management do you want? None with Bower and script injection
Which JS preprocessor do you want? Pure old JavaScript
Which CSS preprocessor do you want? CSS
Which Continuous Integration platform do you want? (none)
Do you want a sample app? A working landing page
Would you like a router? Angular UI Router
Edit a file and save, liveReload should work and your change should show up in browser.
Now build the app
gulp build
Now edit a file and save, liveReload works, but change does not show up in browser untill you build again.
Related
I'm using Webpack as core for all my front-end js project since more than a year. I'm starting to work with KRPano to create customized virtual tour. My goal is to be able to continue using my module style developement with Webpack, and include KRPano to this kind of project.
Actually the framework is a JS file with several functions to embed the viewer etc... And several js files that contains all krpano plugins.
I tried to just export the krpano file functions and include that in my project, but i got several errors and impossible de compile.
Wanted to know if someone ever done something like that, or if is there an alternative to webpack that will allow me to solve that issue ?
Thanks,
Navalex.
There are many similar frameworks. And each for their own purposes. Frameworks like Electron, Cordova may suit you. On Cordova, I created APK from Krpano tour and worked fine on my phone
Maybe your problem is that krpano is already "webpacked" and depending on which framework are you working you need the builded version and a server running.
What i have done is:
create react app
import vtour folder inisde src (for example)
navigate with a single button into vtour/index.html
build js app (react in my case)
add vtour files in the same route in builded app
sumbit to githubpages or glitch.me or something to test
Result Example:
https://imaciap.github.io/Manresa360Deploy/
Ionic 4 CLI is seems to be friendly only with Angular7. And Angular7 is slow like.. send for compile and go take a shower and back and maybe the bundle will be ready. Actually the worst framework the front end ever met.
AngularJS is probably the best happened to front end world. Everything is fast, reliable, straight forward. When you combine this with Webpack you can enjoy an high level of programming language including exports and imports and classes and and components just everything else you need.
However, the Ionic CLI doesn't integrated with something else than the Angular7.
So I have tried to create a cordova based project using:
cordova create test
And then tried to "manually" setting things up.
I have installed Webpack in the cordova based project so now it's accessiable through the node_modules folder. Then I have created the webpack.config.js file in the same directory.
Then I have created src directory which stores the webpack.entry.js file. The webpack.config file reads what the entry file created and creates a new folder called www and there it places index.html file and bundle.js.
Then I am trying to run cordova run --device with Android device connected and the app is getting actioned in the actual device.
Very nice.
However, I have some issues: it seems that the files that are in the bundle doesn't going to be work since angularjs is not completely served.
I mean, in order to serve an angularjs app you probably need a static server or serve it via node. In this case this doesn't happening so it just like drag the index.html file to the Chrome browser and have it not working at all.
I have searched tons at Google but found just nothing.
Is there any boilerplate working with Cordova + Webpack + AngularJs + Ionic framework's components, working fast with livereload?
I have a React application created using create-react-app. I also have an external application that is using this application by including the bundled JS and CSS files (the ones create using the build script).
Right now, I'm using the React template created by the dotnet new command, and I have configured the server to serve static files located in the build folder.
For this reason, I have created a couple of additional NPM scripts that rename the bundle files (remove the hash from the name), so that I don't need to update my external application's links with every build.
Right now, whenever I change something in the code, the whole build process has to be processed to create the two files.
I have created a "watch" task to run my build scripts whenever I have a change, but I was wondering if there is a way to speed up the process and somehow configure the React application to be served from memory or something just like when we "normally" run the application.
So, maybe a couple of questions:
How to achieve this in a "normal" React app created by create-react-app?
how to achieve this in the context of the dotnet template?
you can use nodemon in the build folder of the create react app.
as the documentation says
By default nodemon monitors the current working directory. If you want to take control of that option, use the --watch option to add specific paths:
so you can use something like this:
nodemon --watch app --watch libs app/server.js
for details try other approaches given here
This could be due to your filesystem, file extensions or the Create-React-App default webpack/project configuration. You don't necessarily have to change all of this because hot-reloading is supposed to work out of the box, and more so if the project has just started.
For example, I once had an issue with a Typescript installation(^17.0.1) where some files with extension .ts will not trigger hot reloading. I had to change to .tsx and add a React import. The same could happen with .js and .jsx files.
In case of problems with your filesystem (Unix, Mac) you can try the React config (FAST_REFRESH=false) here... or changing folder names, but I haven't bumped much into this.
If I create an application through node.js, how can I add html and js files to it? Specifically, I created an App in Dreamweaver, but I cannot find the config.xml file. So I want to create a PhoneGap App and add the appropriate files externally and edit the config.xml from there. Any help would be much appreciated!
Have a look at the phonegap documentation.
Phonegap documentation
Install phonegap, create the app at your project location and build the app. Your config.xml file will be generated by the build. Then you can edit it the way you want.
I'm attempting to build my first phonegap application using the phonegap build cloud compiler. In the instructions there it says to remove phonegap.js before uploading... Where is this mystery file? I downloaded the latest phonegap and nothing in the /Libs/ looks right. There seems to be no documentation on how to setup your root HTML page properly to be compiled with phonegap.
"Once you've included the necessary assets, remove the phonegap.js (cordova.js) as Build will automatically inject it during compile time." - https://build.phonegap.com/docs/preparing-your-app#what_do_i_upload
I'm under the impression that I just need to use the JS API for code completion and then let the cloud compiler do its work, but all the documentation revolves around installing an SDK for each platform. I don't want to use xCode or eclipse-- I just want to write javascript.
What is the bare minimum resources I need to include on my root HTML file?
What is the bare minimum resources I need to include on my root HTML
file?
You need just 2 files: index.html (may be the name "index.html" is configurable in the config.xml, I am not sure) and config.xml.
Here is a starter app: https://github.com/phonegap/phonegap-start, take a look in the www folder.