diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..97acc73 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present +# - run: npm test diff --git a/README.md b/README.md index 5e089bb..5d6bd4b 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,19 @@ Our assets (CSS/JS) for Laravel Nova 4 improvements # terser (https://github.com/terser/terser) for JS <- todo +# csso for CSS + +# How to use + +## Install +In `NovaServiceProvider`: +```php +public function boot() +{ + // ... + Nova::style('nova-custom-panel-assets', 'https://cdn.jsdelivr.net/gh/The-3Labs-Team/nova-custom-panel-assets@main/dist/css/main.css'); +// Nova::script('nova-custom-panel-assets', __DIR__.'/../dist/js/nova-custom-panel-assets.js'); +} +``` + +Version 1: https://cdn.jsdelivr.net/gh/The-3Labs-Team/nova-custom-panel-assets@1/dist/css/main.css diff --git a/package.json b/package.json index ccccaaa..d2a89c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "scripts": { - "build": "csso src/css/main.css -o dist/css/main.css" + "build": "npm run compress:css", + "compress:css": "csso src/css/main.css -o dist/css/main.css" }, "dependencies": { "csso-cli": "^4.0.2"