Skip to content

Commit e6f112b

Browse files
committed
Initial commit - v1.0.0
1 parent 2dde4ff commit e6f112b

File tree

174 files changed

+70534
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+70534
-2
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.DS_Store
2+
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
10+
# Runtime data
11+
pids
12+
*.pid
13+
*.seed
14+
*.pid.lock
15+
16+
# Dependency directories
17+
node_modules/
18+
19+
# Optional npm cache directory
20+
.npm
21+
22+
# Optional eslint cache
23+
.eslintcache
24+
25+
# Optional REPL history
26+
.node_repl_history
27+
28+
# Output of 'npm pack'
29+
*.tgz
30+
31+
# Yarn Integrity file
32+
.yarn-integrity
33+
34+
# dotenv environment variables file
35+
.env

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [1.0.0] - 2018-09-11
6+
7+
* Initial release.

CONTRIBUTING.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change.
5+
6+
Please note we have a code of conduct, please follow it in all your interactions with the project.
7+
8+
## Pull Request Process
9+
10+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
11+
build.
12+
2. Update the README.md with details of changes to the interface, this includes new environment
13+
variables, exposed ports, useful file locations and container parameters.
14+
3. Increase the version numbers in any examples files and the README.md to the new version that this
15+
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
16+
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
17+
do not have permission to do that, you may request the second reviewer to merge it for you.
18+
19+
## Code of Conduct
20+
21+
### Our Pledge
22+
23+
In the interest of fostering an open and welcoming environment, we as
24+
contributors and maintainers pledge to making participation in our project and
25+
our community a harassment-free experience for everyone, regardless of age, body
26+
size, disability, ethnicity, gender identity and expression, level of experience,
27+
nationality, personal appearance, race, religion, or sexual identity and
28+
orientation.
29+
30+
### Our Standards
31+
32+
Examples of behavior that contributes to creating a positive environment
33+
include:
34+
35+
* Using welcoming and inclusive language
36+
* Being respectful of differing viewpoints and experiences
37+
* Gracefully accepting constructive criticism
38+
* Focusing on what is best for the community
39+
* Showing empathy towards other community members
40+
41+
Examples of unacceptable behavior by participants include:
42+
43+
* The use of sexualized language or imagery and unwelcome sexual attention or
44+
advances
45+
* Trolling, insulting/derogatory comments, and personal or political attacks
46+
* Public or private harassment
47+
* Publishing others' private information, such as a physical or electronic
48+
address, without explicit permission
49+
* Other conduct which could reasonably be considered inappropriate in a
50+
professional setting
51+
52+
### Our Responsibilities
53+
54+
Project maintainers are responsible for clarifying the standards of acceptable
55+
behavior and are expected to take appropriate and fair corrective action in
56+
response to any instances of unacceptable behavior.
57+
58+
Project maintainers have the right and responsibility to remove, edit, or
59+
reject comments, commits, code, wiki edits, issues, and other contributions
60+
that are not aligned to this Code of Conduct, or to ban temporarily or
61+
permanently any contributor for other behaviors that they deem inappropriate,
62+
threatening, offensive, or harmful.
63+
64+
### Scope
65+
66+
This Code of Conduct applies both within project spaces and in public spaces
67+
when an individual is representing the project or its community. Examples of
68+
representing a project or community include using an official project e-mail
69+
address, posting via an official social media account, or acting as an appointed
70+
representative at an online or offline event. Representation of a project may be
71+
further defined and clarified by project maintainers.
72+
73+
### Enforcement
74+
75+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
76+
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
77+
complaints will be reviewed and investigated and will result in a response that
78+
is deemed necessary and appropriate to the circumstances. The project team is
79+
obligated to maintain confidentiality with regard to the reporter of an incident.
80+
Further details of specific enforcement policies may be posted separately.
81+
82+
Project maintainers who do not follow or enforce the Code of Conduct in good
83+
faith may face temporary or permanent repercussions as determined by other
84+
members of the project's leadership.
85+
86+
### Attribution
87+
88+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
89+
available at [http://contributor-covenant.org/version/1/4][version]
90+
91+
[homepage]: http://contributor-covenant.org
92+
[version]: http://contributor-covenant.org/version/1/4/

ISSUE_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Expected Behavior
2+
<!--- Tell us what should happen -->
3+
4+
## Current Behavior
5+
<!--- Tell us what happens instead of the expected behavior -->
6+
7+
## Steps to Reproduce
8+
1.
9+
2.
10+
3.
11+
12+
## Context (Environment)
13+
<!--- How has this issue affected you? What are you trying to accomplish? -->
14+
15+
## Possible Solution
16+
<!--- Not required, but suggest a fix/reason for the bug, -->
17+
18+
## Possible Implementation
19+
<!--- Not required, but suggest an idea for implementing addition or change -->

README.md

Lines changed: 155 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,155 @@
1-
# shards-vue
2-
🌟Shards Vue is a free, beautiful and modern Vue.js UI kit based on Shards. https://github.com/designrevision/shards-ui
1+
<p align="center">
2+
<img src="logo.jpg" width="230" />
3+
</p>
4+
5+
<p align="center">
6+
Shards Vue is a free, beautiful and modern Vue.js UI kit <br /> based on <a href="https://github.com/designrevision/shards-ui">Shards</a>.
7+
</p>
8+
9+
<br />
10+
11+
<p align="center">
12+
<a href="#">
13+
<img src="https://img.shields.io/badge/License-MIT-brightgreen.svg" />
14+
</a>
15+
<a href="https://twitter.com/designrevision">
16+
<img src="https://img.shields.io/twitter/follow/DesignRevision.svg?style=social&label=Follow" />
17+
</a>
18+
</p>
19+
20+
<br />
21+
22+
<p align="center">
23+
<a href="https://designrevision.com/docs/shards-vue/"><strong>Documentation</strong></a> •
24+
<a href="https://designrevision.com/downloads/shards-vue/"><strong>Official Page</strong></a>
25+
</p>
26+
27+
28+
### Getting Started
29+
30+
Getting started with Shards Vue is fairly simple. You can download Shards Vue via the official website, here on GitHub as a release package or by using a package manager such as Yarn or NPM.
31+
32+
* [Official Website](https://designrevision.com/download/shards)
33+
* [Release Package](https://github.com/DesignRevision/shards-ui/releases)
34+
35+
<br />
36+
37+
### Quick Start
38+
39+
You can install Shards Vue via Yarn or NPM.
40+
41+
```bash
42+
// Install via Yarn
43+
yarn add shards-vue
44+
45+
// Install via NPM
46+
npm i shards-vue
47+
```
48+
49+
<br />
50+
51+
### Module Bundlers
52+
53+
If you are using a module bundler such as [Webpack](https://webpack.js.org/) or [Rollup](https://rollupjs.org/), you can include the entire Shards Vue library inside your project.
54+
55+
```javascript
56+
import Vue from 'vue'
57+
import ShardsVue from 'shards-vue'
58+
59+
// Import base styles (Bootstrap and Shards)
60+
import 'bootstrap/dist/css/bootstrap.css'
61+
import 'shards-ui/dist/css/shards.css'
62+
63+
Vue.use(ShardsVue);
64+
```
65+
66+
<br />
67+
68+
### Registering Components as Vue Plugins
69+
70+
If you'd like to register only certain components as Vue plugins, make sure to import just the component you'd like to use.
71+
72+
```javascript
73+
import Vue from 'vue'
74+
75+
// Import base styles (Bootstrap and Shards)
76+
import 'bootstrap/dist/css/bootstrap.css'
77+
import 'shards-ui/dist/css/shards.css'
78+
79+
import { Button } from 'shards-vue/src/components'
80+
Vue.use(Button)
81+
82+
```
83+
84+
<br />
85+
86+
### Importing Single File Components
87+
88+
Importing single file components is also possible.
89+
90+
```vue
91+
<template>
92+
<d-button @click="handleClick">Click Me!</d-button>
93+
</template>
94+
95+
<script>
96+
import dButton from 'shards-vue/src/components/button/Button'
97+
98+
export default {
99+
components: {
100+
dButton
101+
},
102+
methods: {
103+
handleClick() {
104+
alert('You just clicked me!')
105+
}
106+
}
107+
}
108+
</script>
109+
```
110+
111+
<br />
112+
113+
### File Sizes
114+
115+
You can also run `yarn bundlesize` at any time to check the compiled file sizes.
116+
117+
| File Name | Size (min.gz) |
118+
|--------------------------|---------------|
119+
| shards-vue.common.min.js | 46.29KB |
120+
| shards-vue.esm.min.js | 46.24KB |
121+
| shards-vue.umd.min.js | 39.3KB |
122+
123+
<br />
124+
125+
### Built Using
126+
127+
* [Shards UI Kit](https://designrevision.com/downloads/shards/)
128+
* [noUiSlider by Léon Gersen (WTFPL License)](https://refreshless.com/nouislider/download/)
129+
* [vuejs-datepicker](https://github.com/charliekassel/vuejs-datepicker)
130+
131+
<br />
132+
133+
### Contributing
134+
135+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
136+
137+
If you'd like to fix a bug or work on a feature, make sure to follow the steps below in order to setup the development environment on your local machine:
138+
139+
1. Clone the repository.
140+
2. Run `yarn` to install all required dependencies.
141+
3. Install Vue CLI and the CLI service globally by running: `npm i -g @vue/cli @vue/cli-service-global`.
142+
4. Run `yarn watch` in order to kickstart the server and run the sandbox with hot reloading.
143+
5. Refer to the `sandbox/Sandbox.vue` file for more details.
144+
145+
<br />
146+
147+
### Roadmap
148+
149+
[View the roadmap.](http://designrevision.com/docs/shards-vue/roadmap)
150+
151+
<br />
152+
153+
### Changelog
154+
155+
[View notable changes.](CHANGELOG.md)

build/optimize.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use strict'
2+
3+
const path = require('path')
4+
const fs = require('fs')
5+
const glob = require('glob')
6+
const UglifyJS = require('uglify-js')
7+
const UglifyES = require('uglify-es')
8+
const PATHS = require('./paths')
9+
10+
let Uglifier = UglifyJS
11+
12+
glob(path.resolve(PATHS.DIST + '/*.js'), {}, function(err, files) {
13+
if (err) {
14+
throw err
15+
}
16+
17+
files.forEach(file => {
18+
if (path.basename(file).indexOf('.min.js') !== -1) {
19+
return
20+
}
21+
22+
if (path.basename(file).indexOf('.esm.js')) {
23+
Uglifier = UglifyES
24+
}
25+
26+
// Define minified file path
27+
let minFilePath = path.basename(file).replace('.js', '.min.js')
28+
minFilePath = path.resolve(PATHS.DIST + '/' + minFilePath)
29+
30+
// Define minified file's map path
31+
let minMapPath = path.basename(file).replace('.js', '.min.map')
32+
minMapPath = path.resolve(PATHS.DIST + '/' + minMapPath)
33+
34+
// Minify
35+
let _c = fs.readFileSync(file, 'utf8')
36+
_c = Uglifier.minify(_c, { mangle: true, compress: true, sourceMap: true })
37+
38+
// Write minified file and sourcemap
39+
fs.writeFileSync(minFilePath, _c.code)
40+
fs.writeFileSync(minMapPath, _c.map)
41+
})
42+
})

build/paths.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict'
2+
3+
const path = require('path')
4+
5+
const PATHS = Object.create(null)
6+
7+
PATHS.BASE = path.resolve(__dirname, '..'),
8+
PATHS.SRC = path.resolve(PATHS.BASE, 'src'),
9+
PATHS.DIST = path.resolve(PATHS.BASE, 'dist')
10+
PATHS.INPUT = path.resolve(PATHS.SRC, 'index.js')
11+
12+
module.exports = PATHS

0 commit comments

Comments
 (0)