I am trying to run the script
ionic build
But the generated build version is always with --production flag. Thus my js/ts code is minified and not suitable for debugging. Do you know a way to build in dev mode?
output of "ionic build"
The command "ionic build -- --mode development" which seems to work for Vue does not seem to work for React.
Ionic React uses Create React App under the hood. This means that you can use CRA build commands instead of Ionic.
As described in this gist, you need to enable profiling mode for CRA to get unminified output.
You can do this with the command react-scripts build -- --profile.
To make it easier, you can add a command to scripts in your package.json like:
"build-profile": "react-scripts build -- --profile",
Related
I have just finished setting up Eslint/prettier/airbnb by watching an online tutorial but what I don't understand is that when I start a new project, will I need to repeat the same processes* again? I wish there was a way to integrate it to VSCode so it starts automatically when I ran the code for any project.
*below is what I meant by processes:
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
npx install-peerdeps --dev eslint-config-airbnb
You could create a template project to avoid having to do that, or you could just copy package.json to you new project, edit it a bit and run npm install
I am very new to this style of workflow, so please don't assume much in the answers.
I have started a new project using Vue CLI 3 creation tools, and including the Mocha-Chai tests. I can run the tests in Yarn (yarn run test:unit)
I would like to know:
How might I attach a debugger to the test run (I am using Visual Studio Code)?
How might I run the tests in a browser?
I'm trying to start an ionic server with --no-open enabled on run ionic serve, as described in ionic CLI documentation.
But, in the generated file I need to use npm run ionic:serve. I'm trying to add an extra parameter on file package.json like:
"ionic:serve": "ionic-app-scripts serve --no-open"
It doesn't works.
Maybe, there is some property in file ionic.config.json that allows me to do it.
So, I have two questions:
How can I avoid to open a browser window using npm run ionic:serve?
Where can I find a complete list of all available properties and their valid values applied to file ionic.config.json?
The correct parameter is --nobrowser instead of --no-open as described in the documentation.
I've noticed the parameter in the github repository of ionic-app-scripts.
I've been using the skeleton navigation skeleton-esnext-webpack environment to run local tests on aurelia. However, sometimes I need to run my tests from a server already set up on the web. I'd like to keep the aurelia plugins intact but not wait so long for the local build to be built and ran since I already have it running elsewhere. The readme doesn't say much about how everything works.
Is there a way to temporarily run my tests while ignoring the local build and setup?
Go the package.json file in the root and modify it as so:
"e2e": "concurrently --success first --kill-others \"npm run e2e:start\"",
You can even keep the original and rename it something else and have that as a local call and rename the above line to run it without building it.
I'm looking to build + run my iphone xcode project totally outside of xcode.
Currently I'm using xcodebuild to build the project - which seems to build cleanly:
https://gist.github.com/8eadfb1acca4d101624b
Unfortunately it doesn't seem to replicate the same Build as done by xcode. Rebuilding it leads to a bunch of syntax errors.
Are there other flags I should be passing xcodebuild?
Maybe you have a problem with shared precompiled headers? Like, building different versions of a project on the same machine. Try stating "clean build" (or clean install, whatever you want to do) as build actions at the end of your xcodebuild call.