Skip to content

Instantly share code, notes, and snippets.

@bryceosterhaus
Last active December 11, 2018 16:45
Show Gist options
  • Save bryceosterhaus/d7bda4e0668f55825e312b9ba3c2119f to your computer and use it in GitHub Desktop.
Save bryceosterhaus/d7bda4e0668f55825e312b9ba3c2119f to your computer and use it in GitHub Desktop.
md

Initial

{
	"scripts": {
		"build": "metalsoy --soyDeps \"node_modules/+(metal-progressbar|metal-tooltip|com.liferay.frontend.js.web)/**/*.soy\" && cross-env NODE_ENV=production babel --source-maps -d classes/META-INF/resources src/main/resources/META-INF/resources && liferay-npm-bundler && npm run cleanSoy",
		"csf": "csf src/**/*.js test/**/*.js",
		"format": "npm run csf -- -i",
		"test": "jest"
	}
}

Using liferay-npm-scripts

package.json

{
	"scripts": {
		"build": "liferay-npm-scripts build --soy",
		"csf": "liferay-npm-scripts lint",
		"format": "liferay-npm-scripts format",
		"test": "liferay-npm-scripts test"
	}
}

.liferaynpmscriptsrc

I'm hesitant to using an additional RC since we already have so many.

{
	"build": {
		"dependencies": [
			"metal-progressbar",
			"metal-tooltip",
			"com.liferay.frontend.js.web"
		]
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment