Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

Commit f88647b

Browse files
author
Loïc Goyet
committed
first commit
0 parents  commit f88647b

28 files changed

+6860
-0
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["es2015"],
3+
"plugins": ["babel-plugin-add-module-exports"]
4+
}

.bowerrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"directory": "test/src/bower_components"
3+
}

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[*]
2+
indent_style = space
3+
indent_size = 4
4+
charset = utf-8
5+
insert_final_newline = true
6+
7+
[*.scss]
8+
indent_size = 2
9+
10+
[src/javascript/**/*.js]
11+
indent_size = 2

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# Directory for instrumented libs generated by jscoverage/JSCover
12+
lib-cov
13+
14+
# Coverage directory used by tools like istanbul
15+
coverage
16+
17+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
18+
.grunt
19+
20+
# node-waf configuration
21+
.lock-wscript
22+
23+
# Compiled binary addons (http://nodejs.org/api/addons.html)
24+
build/Release
25+
26+
# Dependency directory
27+
node_modules
28+
29+
# Optional npm cache directory
30+
.npm
31+
32+
# Optional REPL history
33+
.node_repl_history
34+
35+
# Test dest
36+
test/dest
37+
test/src/bower_components

.npmignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
test/
2+
.bowerrc
3+
.gitignore
4+
bower.json
5+
sache.json
6+
gulpfile.babel.js
7+
node_modules
8+
bower_components
9+
yarn.lock
10+
package-lock.json
11+
<% if (props.javascript) { %>webpack.config.js<% } %>
12+
<% if (props.javascript) { %>.babelrc<% } %>

.scss-lint.yml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
linters:
2+
3+
BangFormat:
4+
enabled: true
5+
space_before_bang: true
6+
space_after_bang: false
7+
8+
BorderZero:
9+
enabled: true
10+
11+
ColorKeyword:
12+
enabled: true
13+
14+
Comment:
15+
enabled: false
16+
17+
DebugStatement:
18+
enabled: true
19+
20+
DeclarationOrder:
21+
enabled: true
22+
23+
DuplicateProperty:
24+
enabled: false
25+
26+
ElsePlacement:
27+
enabled: true
28+
style: same_line
29+
30+
EmptyLineBetweenBlocks:
31+
enabled: true
32+
ignore_single_line_blocks: false
33+
34+
EmptyRule:
35+
enabled: true
36+
37+
FinalNewline:
38+
enabled: true
39+
present: true
40+
41+
HexLength:
42+
enabled: true
43+
style: short
44+
45+
HexNotation:
46+
enabled: true
47+
style: lowercase
48+
49+
HexValidation:
50+
enabled: true
51+
52+
IdSelector:
53+
enabled: true
54+
55+
ImportPath:
56+
enabled: true
57+
leading_underscore: false
58+
filename_extension: false
59+
60+
Indentation:
61+
enabled: true
62+
character: space
63+
width: 2
64+
65+
LeadingZero:
66+
enabled: true
67+
style: include_zero
68+
69+
MergeableSelector:
70+
enabled: false
71+
force_nesting: false
72+
73+
NameFormat:
74+
enabled: true
75+
convention: hyphenated_lowercase
76+
allow_leading_underscore: true
77+
78+
NestingDepth:
79+
enabled: true
80+
max_depth: 3
81+
82+
PlaceholderInExtend:
83+
enabled: true
84+
85+
PropertySortOrder:
86+
enabled: false
87+
ignore_unspecified: false
88+
89+
PropertySpelling:
90+
enabled: true
91+
extra_properties: []
92+
93+
QualifyingElement:
94+
enabled: true
95+
allow_element_with_attribute: false
96+
allow_element_with_class: false
97+
allow_element_with_id: false
98+
99+
SelectorDepth:
100+
enabled: true
101+
max_depth: 3
102+
103+
SelectorFormat:
104+
enabled: false
105+
convention: hyphenated_lowercase
106+
class_convention: '^(?:u|is|has)\-[a-z][a-zA-Z0-9]*$|^(?!u|is|has)[a-zA-Z][a-zA-Z0-9]*(?:\-[a-z][a-zA-Z0-9]*)?(?:\-\-[a-z][a-zA-Z0-9]*)?$'
107+
108+
Shorthand:
109+
enabled: true
110+
111+
SingleLinePerProperty:
112+
enabled: true
113+
allow_single_line_rule_sets: false
114+
115+
SingleLinePerSelector:
116+
enabled: true
117+
118+
SpaceAfterComma:
119+
enabled: true
120+
121+
SpaceAfterPropertyColon:
122+
enabled: true
123+
style: one_space
124+
125+
SpaceAfterPropertyName:
126+
enabled: true
127+
128+
SpaceBeforeBrace:
129+
enabled: true
130+
style: space
131+
allow_single_line_padding: true
132+
133+
SpaceBetweenParens:
134+
enabled: true
135+
spaces: 0
136+
137+
StringQuotes:
138+
enabled: true
139+
style: single_quotes
140+
141+
TrailingSemicolon:
142+
enabled: true
143+
144+
TrailingZero:
145+
enabled: true
146+
147+
UnnecessaryMantissa:
148+
enabled: true
149+
150+
UnnecessaryParentReference:
151+
enabled: true
152+
153+
UrlFormat:
154+
enabled: false
155+
156+
UrlQuotes:
157+
enabled: true
158+
159+
VendorPrefixes:
160+
enabled: true
161+
identifier_list: base
162+
include: []
163+
exclude: []
164+
165+
ZeroUnit:
166+
enabled: true

CONTRIBUTING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing
2+
3+
## Tools & Workflow
4+
5+
The workflow to test into a browser the component is setted with gulp (and webpack for the javascript part).
6+
7+
All the files versionned for live testing are written `./test/src` folder.
8+
The gulp workflow will generate, from those files, a `./test/dest` used by a local server (running via gulp) to renderer into your browser the component.
9+
10+
You have several commands for making the `./test/dest` folder :
11+
12+
```sh
13+
# run gulp tasks to build the `./test/dest` folder
14+
npm run test
15+
16+
# run gulp tasks to build the `./test/dest` folder in watch mode, and setup a localserver with livereload
17+
npm start
18+
```
19+
20+
Thoses commands generates css for the `./test` folder and for the `./dest` folder (in normal and minified version).
21+
22+
23+
24+
### Javascript
25+
Javascript is transpiled and packaged with webpack. The workflow setuped here allow us to generate a script file browser-friendly into the `./dest/javascript` folder from a es2015 friendly (ready to be included in packaged workflows) script located at `./src/javascript`.
26+
27+
Here are the two commands for working with the javascript :
28+
29+
```sh
30+
# builds the browser-friendly javascript file
31+
npm run build-javascript
32+
33+
# builds the browser-friendly javascript file in watch mode
34+
npm run build-javascript-dev
35+
```
36+
37+
Thoses commands generates javascript for the `./test` folder and for the `./dest` folder (in normal and minified version).
38+
39+
40+
41+
## Writing a Trowel Component
42+
[Checkout the documentation](https://github.com/Trowel/Trowel/blob/master/doc/3-create-your-own-trowel-component.md) from the trowel-core project, to learn about how writting a Trowel Component
43+
44+
## Good practices
45+
To be written

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Trowel
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
![Friends of Trowel](https://raw.githubusercontent.com/Trowel/Trowel/master/media/dist/banners/friendsoftrowel-black-on-transparent.png)
2+
3+
# Trowel Modals
4+
[![npm version](https://badge.fury.io/js/trowel-Modals.svg)](https://badge.fury.io/js/trowel)
5+
[![Bower version](https://badge.fury.io/bo/trowel-Modals.svg)](https://badge.fury.io/bo/trowel-Modals)
6+
7+
The official Trowel Component for modals
8+
Modals is a *Trowel Component*, please refer to the [Trowel doc](https://github.com/Trowel/Trowel/blob/master/doc/1-the-concept.md) for more informations about how works *Trowel Components*
9+
10+
## Getting Started
11+
### Download
12+
You can easily install *Trowel Modals* by using npm, Yarn or Bower
13+
14+
```bash
15+
# With bower
16+
$ bower install trowel-modals
17+
18+
# With npm
19+
$ npm install trowel-modals
20+
21+
# With yarn
22+
$ yarn add trowel-modals
23+
```
24+
25+
You can also download a zip archive [right here](https://github.com/FriendsOfTrowel/Modals/archive/master.zip).
26+
27+
### Installation
28+
#### *Scss*
29+
The main scss file to include to your main `.scss` file is located at the `./src/scss/modals.scss`. As a *Trowel Component*, it also requires two dependencies to compile the *scss* code. Here an *scss* installation snippet.
30+
31+
```
32+
// Trowel Dependencies
33+
@import './path/to/dependencies/trowel-core/src/trowel';
34+
35+
// Trowel Components Modals
36+
@import './path/to/dependencies/trowel-modals/src/scss/modals.scss';
37+
```
38+
39+
#### *CSS*
40+
If you don't want to customize the trowel component in `scss` you can use the css file available at `./dest/css/modals.css`. A minified version is available at the same location.
41+
42+
#### *JavaScript*
43+
You have several javascript files for different use cases :
44+
* The browser ready file is available at `./dest/javascript/modals.js` (a minified version exists at `dest/javascript/modals.min.js`)
45+
* The script written in es2015 and ready to `import` is available at `./src/javascript/modals.js`
46+
47+
48+
49+
50+
## Usage
51+
to be written
52+
53+
## Contributing
54+
If you want to contribute you can checkout the contribution guide [over here](CONTRIBUTING.md)
55+
56+
## License
57+
MIT © [Trowel](trowel.github.io)

0 commit comments

Comments
 (0)