Lint and build commands could be added to a GitHub Action
For example the build and lint commands from the scripts section ...
"scripts": {
"build": "npm run build:lib & npm run build:umd",
"build:lib": "tsc --outDir lib --module commonjs",
"build:es": "tsc --outDir es --module es2015",
"build:umd": "npm run build:es && rollup --config && dts-bundle --name dist/bundle --main es --outputAsModuleFolder",
"clean": "rimraf dist es lib coverage tailwindcss-classnames.ts tailwind.config.js",
"typecheck": "tsc --noEmit",
"lint": "eslint \"src/**/*.{js,ts}\" --quiet --fix && npm run format",
"format": "prettier \"**/*.{md,js,jsx,json,ts,tsx}\" --write",
"test": "jest --env=jsdom --coverage --passWithNoTests",
"test:watch": "jest --env=jsdom --watch --updateSnapshot",
"prepublishOnly": "npm run build",
"prebuild": "npm run clean",
"postbuild": "rimraf {lib,es}/**/__tests__ {lib,es}/**/*.{spec,test}.{js,d.ts,js.map}",
"posttest": "npm run typecheck && npm run lint",
"preversion": "npm test",
"postversion": "git push && git push --tags",
"release": "standard-version",
"pregenerate": "npm run clean && npm run build:lib",
"generate": "tailwindcss init --full && node lib/cli/index.js --config tailwind.config.js --output src/index.ts",
"postgenerate": "npm run clean",
"preupdateConfig": "npm run clean",
"updateConfig": "tailwindcss init --full && node helpers/updateDefaultConfig.js",
"postupdateConfig": "npm run clean && prettier src/cli/lib/defaultTailwindConfig.ts --write"
},
That would save a tremendous amount of time. Thanks for the suggestion! :+1:
No problem. I know I already reviewed the project in a YouTube video (being edited tomorrow and posted later this week), but I am thinking of doing another video dedicated to adding value to a projects. I think so many projects could benefit from having some of their commands added to a GitHub Action, and this would make a great contribution from the community.
If you could assign this ticket to me and I will link it from our discussion in our community repo, I will try to create a dedicated video on this, this week 🤓
Done. :+1: Thanks a lot!
I would like to try to add these two Github actions. Is it okey? :)
@Eezi sure, I didn't get round to it yet, I was going to do it this week
I already did add lint command for Github actions, but build command is not done yet.
ok cool 👍