dmardev/skele

Simple skeleton for projects

Maintainers

Details

gitlab.com/d.mar/skele

Source

Issues

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:project

0.5.2 2023-10-17 09:10 UTC

This package is auto-updated.

Last update: 2024-04-17 10:14:59 UTC


README

Just a small skele for personal projects.

Getting Started

Use Composer to create the project, choose the desired JavaScript toolkit/task-runner to use (currently Gruntjs/Gulp) and launch the runner. Assets inside the src folder will run the next steps to dist/public destination:

  • Sass files - Sass compiler, minify and move to dist/public folder.
  • JavaScript files - Uglify, compress and move to dist/public folder.
  • Images - Compress and move to dist/public.
  • Fonts - Copy to dist/public folder.

Gitlab CI/CD has been set to use 4 Stages: build, test, deploy and release. Jobs under test stage cover code quality and a simple code coverage. Release job would run the semantic-release support under Gitlab.

Create project:

composer create-project dmardev/skele

Post install script should ask for user input to install the desired task-runner (gruntjs/gulp), with the watch task ready.

Gitlab CI/CD

Check Gitlab CI/CD to enable pipelines.

Manually install Tasks runners

Install the desired JS toolkit/task-runner manually by composer post-install-cmd shell script:

bash src/scripts/composer-post-create-project.sh

For gruntjs, use/edit the helper shell script:

bash src/scripts/install-gruntjs.sh

or:

  1. Install node.js & npm:

    sudo apt-get install nodejs npm
    node -v && npm -v
    
  2. Install Gulp globally:

    sudo npm install -g grunt-cli
    
  3. Install Grunt related packages:

     npm install --save-dev grunt grunt-contrib-imagemin grunt-contrib-copy imagemin-mozjpeg@7.0.0 grunt-contrib-cssmin grunt-contrib-sass grunt-contrib-uglify grunt-contrib-watch grunt-sass sass
    

For Gulp, use/edit the helper shell script:

bash src/scripts/install-gulp.sh

or:

  1. Install node.js & npm:

    sudo apt-get install nodejs npm
    node -v && npm -v
    
  2. Install Gulp globally:

    sudo npm install -g gulp-cli
    
  3. Install Gulp related packages:

    npm install --save-dev gulp gulp-clean-css gulp-imagemin@7.0.0 gulp-concat gulp-cssnano gulp-file gulp-sass gulp-sourcemaps gulp-uglify gulp-uglifycss gulp-watch sass
    

Run the task runner:

Gulp:

gulp watch &

Gruntjs:

grunt watch &

To stop the task runner:

Gulp:

killall gulp

Gruntjs:

killall grunt

TODO

  • Add webpack support.

License

Distributed under the Public domain license. See LICENSE for more information.

Contact

David Martín - hola@dmar.dev - https://dmar.dev

Project Link: https://gitlab.com/d.mar/skele