Skip to content

Commit

Permalink
Proje başlangıç dosyaları oluşturuldu
Browse files Browse the repository at this point in the history
Signed-off-by: Tanju Yildiz <[email protected]>
  • Loading branch information
mavisland committed Dec 13, 2022
1 parent 86b9952 commit 7a620f8
Show file tree
Hide file tree
Showing 247 changed files with 78,564 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
defaults
not baidu 7.12
not IE 6-11
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true

[*.{html,twig}]
indent_size = 4
indent_style = tab
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Enforce Unix newlines
* text=auto eol=lf
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: mavisland
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
time: "12:00"
timezone: "Europe/Istanbul"
open-pull-requests-limit: 10
reviewers:
- "mavisland"
labels:
- "dependencies"
ignore:
- dependency-name: "del"
- dependency-name: "gulp-imagemin"
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## OS X
.DS_Store
.AppleDouble
.LSOverride
Icon
._*
.Spotlight-V100
.Trashes

## Windows
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

# ignore node dependency directories
node_modules/

# ignore log files and databases
*.log
*.sql
*.sqlite

# Editor configs
.idea/

# Project-specific
build/
public/
*.map
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.17.0
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Ignoring Folders
**/.git
**/.svn
**/.hg
**/node_modules
build
vendor

# Ignoring Files
**/*.lock
**/*.min.css
**/*.min.js
17 changes: 17 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": false,
"bracketSpacing": true,
"overrides": [
{
"files": ["*.html", "*.twig"],
"options": {
"tabWidth": 4,
"useTabs": true
}
}
]
}
8 changes: 8 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/*.js
**/*.min.css
**/*.html
node_modules/**/*.css
node_modules/**/*.js
public/**/*.css
public/**/*.js
public/**/*.html
7 changes: 7 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": ["stylelint-config-prettier", "stylelint-config-twbs-bootstrap"],
"rules": {
"declaration-no-important": null,
"scss/selector-no-union-class-name": true
}
}
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"dbaeumer.vscode-eslint", // Eslint
"editorconfig.editorconfig", // Editor Config
"esbenp.prettier-vscode", // Prettier
"stylelint.vscode-stylelint", // Stylelint
"1000ch.svgo", // svgo
"mblode.twig-language", // Twig Language
"bradlc.vscode-tailwindcss" // Tailwind CSS IntelliSense
]
}
29 changes: 29 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"css.validate": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"files.associations": {
".twig": "html"
},
"less.validate": false,
"prettier.requireConfig": true,
"tailwindCSS.validate": false,
"[css]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[twig]": {
"editor.defaultFormatter": "mblode.twig-language",
"editor.formatOnSave": true,
"editor.tabSize": 4
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Tanju Yıldız

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
126 changes: 126 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# boilerplate

A boilerplate for building web projects with [Gulp.js](https://gulpjs.com/).

## Getting Started

### Features

- Compile, minify, autoprefix SASS files.
- Compile, concatenate and minify JavaScript.
- Render Twig templates.
- Optimise GIF, JPEG, PNG and SVG images.
- Archive `dist` content.
- Watch for file changes, and automatically recompile build.
- Hot reloading with `browser-sync`.

### Quick Start

```
# 1 Clone this repo
git clone https://github.com/mavisland/boilerplate.git
# 2 Navigate into the repo directory
cd boilerplate
# 3 Install all node packages
npm install
# 4 Get started
npm run start
```

### Requirements

This project requires you have [Node.js](https://nodejs.org/) with [npm](https://www.npmjs.com/get-npm) installed.
This project requires you have a global installation of [gulp-cli](https://www.npmjs.com/package/gulp-cli).

```
# Install gulp-cli globally
npm install -g gulp-cli
```

## Documentation

Add your source files to the appropriate `src` subdirectories. Gulp.js will process and and compile them into `dist`.

### Styles

Files in the `src/scss` directory will be compiled to `dist/css`.

### Scripts

Put your JavaScript files in the `src/js` directory. Files placed directly in the `src/js` folder will compile directly to `dist/js` as both minified and unminified files.

### Templates

Put your `Twig` templates in the `src/html` directory. Files placed directly in the `src/html` folder will compile directly to `dist`.

### Images

Place GIF, JPEG, PNG and SVG images in the `src/images` directory. Images will be optimized with `imagemin` plugins and compiled into `dist/images`.

### Sprites

Converts a series of images in the `src/sprites/image` folder to a sprite sheet and CSS styles.

## Options

### Tasks

| Task Name | Task Decription |
| --------- | ----------------------------------------------- |
| archive | Archive `dist` content |
| build | Run all tasks |
| images | Optimise GIF, JPEG, PNG and SVG images |
| serve | Watch for changes to the `src` directory |
| scripts | Concanate & minify JavaScript files |
| sprites | Your images, icons, et al convert a spritesheet |
| styles | Compile, autoprefix & minify SASS files |
| templates | Render Twig templates |
| watch | Watch all file changes |

### Paths

Adjust the `input`, `output`, `watch` paths for all of the Gulp.js tasks under the `paths` variable. Paths are relative to the root project folder.

```js
// Paths
const paths = {
archive: {
input: "dist/**",
output: "build/",
},
images: {
input: ["src/images/*.{gif,ico,jpg,png,svg}", "src/sprites/s.png"],
output: "dist/images",
watch: ["src/images/*.{gif,ico,jpg,png,svg}", "src/sprites/s.png"],
},
scripts: {
input: ["src/js/plugins.js", "src/js/main.js"],
output: "dist/js",
watch: "src/js/**/*.js",
},
server: {
root: "dist/",
},
sprites: {
input: "src/sprites/**/*.svg",
output: "dist/images",
},
styles: {
input: "src/scss/*.scss",
output: "dist/css",
watch: "src/scss/**/*.scss",
},
templates: {
input: "src/html/*.twig",
output: "dist/",
watch: "src/html/**/*.twig",
},
};
```

## License

The code is available under the [MIT License](LICENSE.md).
Loading

0 comments on commit 7a620f8

Please sign in to comment.