tailwindcss-classnames icon indicating copy to clipboard operation
tailwindcss-classnames copied to clipboard

Lint and build commands could be added to a GitHub Action

Open eddiejaoude opened this issue 4 years ago • 7 comments

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"
  },

eddiejaoude avatar Dec 30 '20 12:12 eddiejaoude

That would save a tremendous amount of time. Thanks for the suggestion! :+1:

muhammadsammy avatar Jan 03 '21 11:01 muhammadsammy

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 🤓

eddiejaoude avatar Jan 03 '21 19:01 eddiejaoude

Done. :+1: Thanks a lot!

muhammadsammy avatar Jan 03 '21 21:01 muhammadsammy

I would like to try to add these two Github actions. Is it okey? :)

Eezi avatar Jan 23 '21 10:01 Eezi

@Eezi sure, I didn't get round to it yet, I was going to do it this week

eddiejaoude avatar Jan 31 '21 13:01 eddiejaoude

I already did add lint command for Github actions, but build command is not done yet.

Eezi avatar Jan 31 '21 15:01 Eezi

ok cool 👍

eddiejaoude avatar Jan 31 '21 15:01 eddiejaoude