scss file changes not registering - maven

So I have an app that I generated with jhipster and I'm using scss. I've made some changes to an scss file that aren't showing up in my application, even after a 'mvn clean package'. Currently running my application with './mvnw' and 'npm start'
What do I do to make these changes show up in my app?

figured it out: npm run webpack:dev does the trick

Related

Is it possible to disable ESLint when running npm run build for a React app?

I have an app initiated using Create React App, so npm run build runs react-scripts build. I recently installed prettier and so added a .eslintrc.json file to the project root to load the prettier plugin. npm run build works as expected locally, but, when deploying the app to Heroku, npm run build tries to run ESLint and fails because the plugins are devDependencies rather than dependencies.
Failed to load plugin 'prettier' declared in '.eslintrc.json': Cannot find module 'eslint-plugin-prettier'
From prior wrangling with a similar issue, I know that I can set NPM_CONFIG_PRODUCTION=false in Heroku so that it will install devDependencies, which actually does resolve the deployment issue. Nevertheless, I'm curious to learn if there's another solution that doesn't require setting NPM_CONFIG_PRODUCTION=false.
Is it possible to prevent npm run build in this scenario from running ESLint altogether or to prevent it from trying to access the plugins specified in .eslintrc.json? I acknowledge that adding .eslintrc.json to .gitignore is one solution, but I want the ESLint configuration in my repo.
you can run "npm run eject" to generate webpack configuration files, and then modify "webpack.config.js",delete the eslint configuration

react-native set ENVFILE file for builds / archives

I'm really confused about production / development builds in react-native. I can get my app working on both iOS and Android by using the package scripts in the terminal
ENVFILE='/path/to/.env' react-native run-ios
ENVFILE='/path/to/.env' react-native run-android
Thats great for running my app locally, but how do I run this command when creating archives through xcode?
I successfully installed react-native-config and I have the variables I need in the JS and native files, its just the final step of using this is prod or staging builds for devices.
I've managed to create fastlane scripts that build and deploy my app (and I can reference my .env vars in fastlane scripts) but that still doesn't bundle my app with the .env vars inside. Its probably something obvious but i'm not understanding the concept at all.
Ive been referencing this tutorial here, and noticing the part about adding a pre-script to each Scheme in xcode:
".env" > /tmp/envfile
But I dont know what the current working directory on that script is, and Im using yarn workspaces so my node_modules folder is not at the root of the RN project (doesnt that even matter?). I've tried multiple paths to my .env from here but nothing works, but I also dont know how to test this script.
I've successfully gotten it to work using Fastlane. I followed this guide for the Fastlane setup:
https://github.com/thecodingmachine/react-native-boilerplate/blob/master/documentation/docs/3_Guides/BetaBuild.md
After following the guide, I moved the Fastlane directory to the root of the project (and updated all paths).
And after that added the ENV variable when running the command, for example: ENVFILE=.env.beta fastlane ios, which is easy to add as a script in package.json.
It's also possible to use the dotenv feature in Fastlane, see https://github.com/fastlane/fastlane/issues/13494#issuecomment-428941643.
Bottom line is that Fastlane will use the environment variable when running the packager, meaning that react-native-config will successfully pick it up and use the proper env-file.

Can't run Cypress Open

I recently took over a cypress project; running on windows. The first time I installed, all was working. Now, subsequent to upgrading node/electron/chrome, I can't open cypress with any command. Here's what I tried:
Delete node_modules directory in my project.
npm init Answered with all defaults. node_modules directory is present but empty.
npm install cypress --save-dev (from [the doc][1]). This populated my node_modules, but installed cypress in my account (users) directory.
node_modules\.bin\cypress open That reported:
It looks like this is your first time using Cypress: 3.1.1
Verified Cypress: [in my users dir]
Opening Cypress...
At that point I can see cypress in my process list, but the UI never shows. I can run headless tests normally, so I'm OK from a CI perspective, but I still want to open the UI with my tests locally. I can launch the cypress executable in my user dir and then open my project root directory manually, but can't run an open command normally. The scripts section of package.json doesn't seem to be designed to accept a path to an exe with params.
Is there another way to call open that I'm missing?
Solution: Go to your project directory which you installed cypress, in your package.json update the cypress version to the latest , look at the releases versions link, or just install the latest from cli:
npm install cypress#latest --save-dev
Reopen again and verify:
./node_modules/.bin/cypress open
//OR
npx cypress open
Did you upgrade the Electron version that Cypress uses? Cypress uses Electron 1.8.2 which is significantly behind the latest, and Cypress does not currently support newer versions of electron. See this Github issue for more info.
try starting with debugging enabled:
DEBUG=cypress:* ./node_modules/.bin/cypress open
I can't use command npm to open cypress neither,
but command npx works well.
So you can try this in your visual studio code: npx cypress open
Using this in my code solved the issue
cypress (folder) -->support --> index.ts
add this:
import './commands'
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from failing the test
return false
})
Didn't work for me as well. I got the same error. I've created new folder in the repo.
Run npm init -y
Run npm install --save-dev cypress
Then go to ./node_modules/.bin/cypress open
And boom the error.
I've workaround it by adding:
{
"scripts": {
"test": "cypress open"
}
}
into package.json
and run cypress with npm run test

Laravel Nova: Build Components

First post.
I'm currently building a Laravel Nova application. I'm making changes to the dashboard component - more specifically the file within the "resources/js/views/Dashboard.vue".
I'm struggling to build the component - does anyone know how to build the component? I have some code which runs webpack.mix to build my JS and SCSS files, but I'm pretty sure it doesn't include the files within the Laravel Nova instance.
Any help will be great.
EXTRA:
I've already tried run the webpack command to build from inside the Laravel Nova instance but it errors out.
UPDATE
I found renaming my webpack.mix.js.dist to webpack.mix.js, running npm run dev whilst within the ./nova directory worked... but only after running php artisan nova:publish
I've wrote a command to compile all these steps but do I have to run php artisan nova:publish everytime, just seems...tedious?
By default, Nova's JavaScript is compiled for production. As such, you will not be able to access the Vue DevTools out of the box without compiling Nova's JavaScript for development. To accomplish this, you may use the following terminal commands from the root of your Nova project:
cd ./vendor/laravel/nova
mv webpack.mix.js.dist webpack.mix.js
npm install
npm run dev
rm -rf node_modules
cd -
php artisan nova:publish
Details: https://nova.laravel.com/docs/2.0/customization/frontend.html#vue-devtools

Build React Native project after pulling from GitHub

My friend initialized a GitHub repo after initializing React Native in a certain directory. After I pull his files into a directory and initialize a local repository on my computer and run the XCode project, there seem to be a lot of missing files and the build fails. There's probably something I need to do which is taken care of when setting up react native in the "react-native init AwesomeProject" step, but I'm not trying to set up a new project. Instead, I want to keep the files he's already developed, but set up the React Native "environment"..how would I go about doing this?
You need to install the dependencies through npm. Just enter the following command in the root directory of your project:
npm i

Resources