Skip to content

Commit 887b4f5

Browse files
author
Graham Butler
committed
initial commit
1 parent 774b2b1 commit 887b4f5

File tree

101 files changed

+14255
-273
lines changed

Some content is hidden

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

101 files changed

+14255
-273
lines changed

.drone.yml

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
# kind: pipeline
2-
# name: release
3-
#
4-
# steps:
5-
# - name: autotag
6-
# image: node
7-
# environment:
8-
# GIT_USER:
9-
# from_secret: GITHUB_USERNAME
10-
# GIT_SECRET:
11-
# from_secret: GITHUB_KEY
12-
# commands:
13-
# - npm install -g @author.io/cicd-autotag
14-
# - autotag --allowInitialNpmPublish
15-
# when:
16-
# event:
17-
# - push
18-
# - name: tag_notification
19-
# image: plugins/slack
20-
# settings:
21-
# webhook:
22-
# from_secret: SLACK_WEBHOOK
23-
# channel: releases
24-
# icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32
25-
# template: >
26-
# <author-{{repo.name}}> autotag on {{build.event}} to {{repo.owner}}/{{repo.name}} failed ({{build.tag}}). See {{build.link}} for details.
27-
# icon_emoji: warning
28-
# when:
29-
# status: [ failure ]
30-
# event:
31-
# - push
32-
# - name: build
33-
# image: node
34-
# commands:
35-
# - npm install
36-
# - npm run build
37-
# when:
38-
# event:
39-
# - tag
40-
# - name: github_release
41-
# image: plugins/github-release
42-
# settings:
43-
# api_key:
44-
# from_secret: GITHUB_TOKEN
45-
# files: dist/**/*
46-
# when:
47-
# event:
48-
# - tag
49-
# - name: npm_release
50-
# image: plugins/npm
51-
# settings:
52-
# username:
53-
# from_secret: NPM_USERNAME
54-
# password:
55-
# from_secret: NPM_PASSWORD
56-
# email:
57-
# from_secret: NPM_EMAIL
58-
# registry: "https://registry.npmjs.org"
59-
# when:
60-
# event:
61-
# - tag
62-
# - name: release_notification
63-
# image: plugins/slack
64-
# settings:
65-
# webhook:
66-
# from_secret: SLACK_WEBHOOK
67-
# channel: releases
68-
# icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32
69-
# template: >
70-
# <author-{{repo.name}}> {{build.tag}} (build {{build.number}}) {{#success build.status}}released{{else}}failed{{/success}}.
71-
# {{build.link}}
72-
#
73-
# {{#success build.status}}
74-
# Availability:
75-
# - CDN: https://cdn.author.io/{{repo.owner}}/{{repo.name}}/{{build.tag}}/author-{{repo.name}}.js
76-
# - npm: `npm install @author.io/element-{{repo.name}}@{{build.tag}}`
77-
# - Release: https://github.com/{{repo.owner}}/{{repo.name}}/releases/tag/{{build.tag}}
78-
# {{/success}}
79-
# when:
80-
# event:
81-
# - tag
1+
kind: pipeline
2+
name: release
3+
4+
steps:
5+
- name: autotag
6+
image: node
7+
environment:
8+
GIT_USER:
9+
from_secret: GITHUB_USERNAME
10+
GIT_SECRET:
11+
from_secret: GITHUB_KEY
12+
commands:
13+
- npm install -g @author.io/cicd-autotag
14+
- autotag --allowInitialNpmPublish
15+
when:
16+
event:
17+
- push
18+
- name: tag_notification
19+
image: plugins/slack
20+
settings:
21+
webhook:
22+
from_secret: SLACK_WEBHOOK
23+
channel: releases
24+
icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32
25+
template: >
26+
<author-{{repo.name}}> autotag on {{build.event}} to {{repo.owner}}/{{repo.name}} failed ({{build.tag}}). See {{build.link}} for details.
27+
icon_emoji: warning
28+
when:
29+
status: [ failure ]
30+
event:
31+
- push
32+
- name: build
33+
image: node
34+
commands:
35+
- npm install
36+
- npm run build
37+
when:
38+
event:
39+
- tag
40+
- name: github_release
41+
image: plugins/github-release
42+
settings:
43+
api_key:
44+
from_secret: GITHUB_TOKEN
45+
files: dist/**/*
46+
when:
47+
event:
48+
- tag
49+
- name: npm_release
50+
image: plugins/npm
51+
settings:
52+
username:
53+
from_secret: NPM_USERNAME
54+
password:
55+
from_secret: NPM_PASSWORD
56+
email:
57+
from_secret: NPM_EMAIL
58+
registry: "https://registry.npmjs.org"
59+
when:
60+
event:
61+
- tag
62+
- name: release_notification
63+
image: plugins/slack
64+
settings:
65+
webhook:
66+
from_secret: SLACK_WEBHOOK
67+
channel: releases
68+
icon_url: https://avatars0.githubusercontent.com/u/46585558?s=32
69+
template: >
70+
<author-{{repo.name}}> {{build.tag}} (build {{build.number}}) {{#success build.status}}released{{else}}failed{{/success}}.
71+
{{build.link}}
72+
73+
{{#success build.status}}
74+
Availability:
75+
- CDN: https://cdn.author.io/{{repo.owner}}/{{repo.name}}/{{build.tag}}/author-{{repo.name}}.js
76+
- npm: `npm install @author.io/element-{{repo.name}}@{{build.tag}}`
77+
- Release: https://github.com/{{repo.owner}}/{{repo.name}}/releases/tag/{{build.tag}}
78+
{{/success}}
79+
when:
80+
event:
81+
- tag

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# __ELEMENT_CLASS-NAME__ [![](https://data.jsdelivr.com/v1/package/npm/@author.io/element-__ELEMENT_NAME__/badge)](https://www.jsdelivr.com/package/npm/@author.io/element-__ELEMENT_NAME__?path=dist) [![Build Status](https://travis-ci.org/author-elements/__ELEMENT_NAME__.svg?branch=master&style=for-the-badge)](https://travis-ci.org/author-elements/__ELEMENT_NAME__)
1+
# AuthorSliderElement [![](https://data.jsdelivr.com/v1/package/npm/@author.io/element-slider/badge)](https://www.jsdelivr.com/package/npm/@author.io/element-slider?path=dist) [![Build Status](https://travis-ci.org/author-elements/slider.svg?branch=master&style=for-the-badge)](https://travis-ci.org/author-elements/slider)
22

33
<!-- TODO: Add description -->
44

5-
![Source Size](https://img.shields.io/github/size/author-elements/__ELEMENT_NAME__/src/element.js.svg?colorB=%23333333&label=Source&logo=JavaScript&logoColor=%23aaaaaa&style=for-the-badge) ![Deliverable Size](https://img.shields.io/bundlephobia/minzip/@author.io/element-__ELEMENT_NAME__.svg?colorB=%23333333&label=Minified-Gzipped&logo=JavaScript&style=for-the-badge) ![npm](https://img.shields.io/npm/v/@author.io/element-__ELEMENT_NAME__.svg?colorB=%23333&label=%40author.io%2Felement-__ELEMENT_NAME__&logo=npm&style=for-the-badge)
5+
![Source Size](https://img.shields.io/github/size/author-elements/slider/src/element.js.svg?colorB=%23333333&label=Source&logo=JavaScript&logoColor=%23aaaaaa&style=for-the-badge) ![Deliverable Size](https://img.shields.io/bundlephobia/minzip/@author.io/element-slider.svg?colorB=%23333333&label=Minified-Gzipped&logo=JavaScript&style=for-the-badge) ![npm](https://img.shields.io/npm/v/@author.io/element-slider.svg?colorB=%23333&label=%40author.io%2Felement-slider&logo=npm&style=for-the-badge)
66

77
We're using BrowserStack to make sure these components work on the browsers developers care about.
88

9-
<a href="https://browserstack.com"><img src="https://github.com/author-elements/__ELEMENT_NAME__/raw/master/browserstack.png" height="30px"/></a>
9+
<a href="https://browserstack.com"><img src="https://github.com/author-elements/slider/raw/master/browserstack.png" height="30px"/></a>
1010

1111
## Usage
1212

1313
There are 4 versions of this element:
1414

15-
1. *author-__ELEMENT_NAME__.min.js* (ES6 Minified for Production)
16-
1. _author-__ELEMENT_NAME__.js_ (ES6 Unminified for Debugging)
17-
1. *author-__ELEMENT_NAME__.es5.min.js* (ES5 Minified for Production)
18-
1. _author-__ELEMENT_NAME__.es5.js_ (ES5 Unminified for Debugging)
15+
1. *author-slider.min.js* (ES6 Minified for Production)
16+
1. _author-slider.js_ (ES6 Unminified for Debugging)
17+
1. *author-slider.es5.min.js* (ES5 Minified for Production)
18+
1. _author-slider.es5.js_ (ES5 Unminified for Debugging)
1919

2020
Each version has it's own source map, so it's always possible to trace activity back to a specific code block in the source.
2121

@@ -27,7 +27,7 @@ You only need to choose one of these files. If you need to support Internet Expl
2727
<html>
2828
<head>
2929
<script src="https://cdn.author.io/author-elements/base/1.0.0/author-base.min.js"></script>
30-
<script src="https://cdn.author.io/author-elements/__ELEMENT_NAME__/x.x.x/author-__ELEMENT_NAME__.min.js"></script>
30+
<script src="https://cdn.author.io/author-elements/slider/x.x.x/author-slider.min.js"></script>
3131
</head>
3232
</html>
3333
```
@@ -38,17 +38,17 @@ If the [base class](https://github.com/author-elements/base) is not yet installe
3838

3939
`npm install @author.io/element-base -S`
4040

41-
Next, install the __ELEMENT_NAME__ module locally:
41+
Next, install the slider module locally:
4242

43-
`npm install @author.io/element-__ELEMENT_NAME__ -S`
43+
`npm install @author.io/element-slider -S`
4444

4545
Then include them in your HTML:
4646

4747
```html
4848
<html>
4949
<head>
5050
<script src="./node_modules/@author.io/element-base/dist/author-base.min.js"></script>
51-
<script src="./node_modules/@author.io/element-__ELEMENT_NAME__/dist/author-__ELEMENT_NAME__.min.js"></script>
51+
<script src="./node_modules/@author.io/element-slider/dist/author-slider.min.js"></script>
5252
</head>
5353

5454
<body>

karma.conf.es5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let customize = require('@author.io/karma-customelements')('test/es5', './dist/author-__ELEMENT_NAME__.es5.js', 'BrowserStack')
1+
let customize = require('@author.io/karma-customelements')('test/es5', './dist/author-slider.es5.js', 'BrowserStack')
22

33
module.exports = config => {
44
config.set(Object.assign(customize(config), {

karma.conf.es6-modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const customize = require('@author.io/karma-customelements')('test/es6-modules', './dist/author-__ELEMENT_NAME__.js', 'BrowserStack')
1+
const customize = require('@author.io/karma-customelements')('test/es6-modules', './dist/author-slider.js', 'BrowserStack')
22

33
module.exports = config => {
44
config.set(Object.assign(customize(config, true, true), {

karma.conf.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const customize = require('@author.io/karma-customelements')('test/es6', './dist/author-__ELEMENT_NAME__.js', 'BrowserStack')
1+
const customize = require('@author.io/karma-customelements')('test/es6', './dist/author-slider.js', 'BrowserStack')
22

33
module.exports = config => {
44
config.set(Object.assign(customize(config, true, false), {

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "@author.io/element-__ELEMENT_NAME__",
2+
"name": "@author.io/element-slider",
33
"version": "1.0.0",
4-
"description": "author-__ELEMENT_NAME__ custom element (web component).",
5-
"main": "dist/author-__ELEMENT_NAME__.min.js",
4+
"description": "author-slider custom element (web component).",
5+
"main": "dist/author-slider.min.js",
66
"scripts": {
77
"build": "npm run clean && rollup -c ./rollup.release.config.js",
88
"build-dev": "npm run build && npm run build-showroom",
@@ -25,15 +25,15 @@
2525
],
2626
"repository": {
2727
"type": "git",
28-
"url": "git+https://github.com/author-elements/__ELEMENT_NAME__.git"
28+
"url": "git+https://github.com/author-elements/slider.git"
2929
},
3030
"keywords": [
3131
"author",
3232
"web",
3333
"component",
3434
"custom",
3535
"element",
36-
"__ELEMENT_NAME__",
36+
"slider",
3737
"chassis",
3838
"ngn"
3939
],
@@ -53,9 +53,9 @@
5353
],
5454
"license": "MIT",
5555
"bugs": {
56-
"url": "https://github.com/author-elements/__ELEMENT_NAME__/issues"
56+
"url": "https://github.com/author-elements/slider/issues"
5757
},
58-
"homepage": "https://github.com/author-elements/__ELEMENT_NAME__#readme",
58+
"homepage": "https://github.com/author-elements/slider#readme",
5959
"devDependencies": {
6060
"@author.io/karma-customelements": "^1.1.11",
6161
"@author.io/rollup-plugin-wcbuilder": "^1.1.4",

rollup.release.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {terser} from 'rollup-plugin-terser'
44
import wcbuilder from '@author.io/rollup-plugin-wcbuilder'
55

66
const input = './src/element.js'
7-
const outfile = 'author-__ELEMENT_NAME__.js'
7+
const outfile = 'author-slider.js'
88
const outdir = './dist'
99
const format = 'iife'
1010
const pkg = require('./package.json')
@@ -22,7 +22,7 @@ const babelConfig = {
2222

2323
const output = file => {
2424
return {
25-
name: '__ELEMENT_CLASS-NAME__',
25+
name: 'AuthorSliderElement',
2626
file: `${outdir}/${outfile.replace(require('path').extname(outfile), '')}${file}`,
2727
format,
2828
banner,

showroom/dist/css/main.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

showroom/dist/css/main.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)