dmardev / skele
Simple skeleton for projects
Requires
- php: >=7.4
Requires (Dev)
- composer/semver: ^3.4
- phpunit/phpunit: ^10.3
README
Just a small skele for personal projects.
- Sublime Text support. sublimetext.com
- SASS support. sass-lang.com/
- Editorconfig support. editorconfig.org
- Sermver support. semver.org
- Composer support. getcomposer.org
- Grunt.js support. gruntjs.com
- Gulp support. gulpjs.com
- PHPUnit support. phpunit.de
- Gitlab CI support. gitlab.com
- Semantic-release support. https://github.com/semantic-release/semantic-release
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:
Install node.js & npm:
sudo apt-get install nodejs npm node -v && npm -v
Install Gulp globally:
sudo npm install -g grunt-cli
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:
Install node.js & npm:
sudo apt-get install nodejs npm node -v && npm -v
Install Gulp globally:
sudo npm install -g gulp-cli
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