Skip to content

Commit 344352d

Browse files
committed
initial commit
0 parents  commit 344352d

File tree

14 files changed

+421
-0
lines changed

14 files changed

+421
-0
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
; Unix-style newlines
2+
[*]
3+
end_of_line = LF
4+
indent_style = tab
5+
trim_trailing_whitespace = false
6+
insert_final_newline = true

.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# Runtime data
6+
pids
7+
*.pid
8+
*.seed
9+
10+
# Directory for instrumented libs generated by jscoverage/JSCover
11+
lib-cov
12+
13+
# Coverage directory used by tools like istanbul
14+
coverage
15+
16+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17+
.grunt
18+
19+
# Compiled binary addons (http://nodejs.org/api/addons.html)
20+
build/Release
21+
22+
# Dependency directory
23+
# Commenting this out is preferred by some people, see
24+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25+
node_modules
26+
27+
# Users Environment Variables
28+
.lock-wscript
29+
30+
docs/
31+
dist/
32+
package-lock.json

.jshintrc

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"globals": {
3+
"steal": true,
4+
"can": true,
5+
"Zepto": true,
6+
"QUnit": true,
7+
"System": true,
8+
"SimpleDOM": true,
9+
"test": true,
10+
"asyncTest": true,
11+
"expect": true,
12+
"module": true,
13+
"ok": true,
14+
"equal": true,
15+
"notEqual": true,
16+
"deepEqual": true,
17+
"notDeepEqual": true,
18+
"strictEqual": true,
19+
"notStrictEqual": true,
20+
"raises": true,
21+
"start": true,
22+
"stop": true,
23+
"global": true
24+
},
25+
"curly": true,
26+
"eqeqeq": true,
27+
"freeze": true,
28+
"indent": 2,
29+
"latedef": "nofunc",
30+
"noarg": true,
31+
"undef": true,
32+
"unused": true,
33+
"trailing": true,
34+
"maxdepth": 4,
35+
"boss" : true,
36+
"eqnull": true,
37+
"evil": true,
38+
"loopfunc": true,
39+
"smarttabs": true,
40+
"maxerr" : 200,
41+
"jquery": true,
42+
"dojo": true,
43+
"mootools": true,
44+
"yui": true,
45+
"browser": true,
46+
"phantom": true,
47+
"rhino": true,
48+
"node": true,
49+
"esnext": true
50+
}

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!dist/

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
node_js: node
3+
before_install:
4+
- "export DISPLAY=:99.0"
5+
- "sh -e /etc/init.d/xvfb start"

CONTRIBUTING.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Contributing to can-simple-observable
2+
3+
## Developing Locally
4+
5+
This section will walk you through setting up the [repository](https://github.com/canjs/can-simple-observable) on your computer.
6+
7+
### Signing up for GitHub
8+
9+
If you don’t already have a GitHub account, you’ll need to [create a new one](https://help.github.com/articles/signing-up-for-a-new-github-account/).
10+
11+
### Forking & cloning the repository
12+
13+
A “fork” is a copy of a repository in your personal GitHub account. “Cloning” is the process of getting the repository’s source code on your computer.
14+
15+
GitHub has a guide for [forking a repo](https://help.github.com/articles/fork-a-repo/). To fork can-simple-observable, you can start by going to its [fork page](https://github.com/canjs/can-simple-observable/fork).
16+
17+
Next, you’ll want to clone the repo. [GitHub’s cloning guide](https://help.github.com/articles/cloning-a-repository/) explains how to do this on Linux, Mac, or Windows.
18+
19+
GitHub’s guide will [instruct you](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork) to clone it with a command like:
20+
21+
```shell
22+
git clone https://github.com/YOUR-USERNAME/can-simple-observable
23+
```
24+
25+
Make sure you replace `YOUR-USERNAME` with your GitHub username.
26+
27+
### Installing the dependencies
28+
29+
After you’ve forked & cloned the repository, you’ll need to install the project’s dependencies.
30+
31+
First, make sure you’ve [installed Node.js and npm](https://docs.npmjs.com/getting-started/installing-node).
32+
33+
If you just cloned the repo from the command line, you’ll want to switch to the folder with your clone:
34+
35+
```shell
36+
cd can-simple-observable
37+
```
38+
39+
Next, install the project’s dependencies with npm:
40+
41+
```shell
42+
npm install
43+
```
44+
45+
### Starting the development server
46+
47+
Run the following to start a dev server:
48+
49+
```shell
50+
npm run develop
51+
```
52+
53+
### Running the tests
54+
55+
You can manually run this repository’s tests in any browser by starting the dev server (see the section above) and visiting this page: http://localhost:8080/test/test.html
56+
57+
Firefox is used to run the repository’s automated tests from the command line. If you don’t already have it, [download Firefox](https://www.mozilla.org/en-US/firefox/new/). Mozilla has guides for installing it on [Linux](https://support.mozilla.org/t5/Install-and-Update/Install-Firefox-on-Linux/ta-p/2516), [Mac](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Mac/ta-p/3453), and [Windows](https://support.mozilla.org/t5/Install-and-Update/How-to-download-and-install-Firefox-on-Windows/ta-p/2210).
58+
59+
After Firefox is installed, you can run:
60+
61+
```shell
62+
npm test
63+
```
64+
65+
### Making a build
66+
67+
Run the following command to create a build:
68+
69+
```shell
70+
npm run build
71+
```
72+
73+
This will create a `dist/` folder that contains the AMD, CommonJS, and global module versions of the project.
74+
75+
#### Minifying your build output
76+
77+
To output minified versions, in the `build.js` add `minify: true` to the outputs.
78+
79+
```js
80+
{
81+
// in build.js export config
82+
outputs: {
83+
"+cjs": { minify: true },
84+
"+amd": { minify: true },
85+
"+global-js": { minify: true }
86+
}
87+
}
88+
```
89+
90+
91+
See [Steal's export options](https://stealjs.com/docs/steal-tools.export.object.html#outputs) for more details.
92+
93+
### Building the documentation
94+
95+
To generate the docs:
96+
97+
```shell
98+
npm run document
99+
```
100+
101+
This will create a `docs/` folder that contains a browsable site with all of your documentation.
102+
103+
With the dev server running, you can view the docs at http://localhost:8080/docs/

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) 2017 Bitovi <contact@bitovi.com> (https://www.bitovi.com/)
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
13+
all 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
21+
THE SOFTWARE.

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# can-simple-observable
2+
3+
[![Join the chat at https://gitter.im/canjs/canjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/canjs/canjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4+
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/canjs/can-simple-observable/blob/master/LICENSE)
5+
[![npm version](https://badge.fury.io/js/can-simple-observable.svg)](https://www.npmjs.com/package/can-simple-observable)
6+
[![Travis build status](https://travis-ci.org/canjs/can-simple-observable.svg?branch=master)](https://travis-ci.org/canjs/can-simple-observable)
7+
[![Greenkeeper badge](https://badges.greenkeeper.io/canjs/can-simple-observable.svg)](https://greenkeeper.io/)
8+
9+
Core observable indicators.
10+
11+
## Documentation
12+
13+
Read the [API docs on CanJS.com](https://canjs.com/doc/can-simple-observable.html).
14+
15+
## Changelog
16+
17+
See the [latest releases on GitHub](https://github.com/canjs/can-simple-observable/releases).
18+
19+
## Contributing
20+
21+
The [contribution guide](https://github.com/canjs/can-simple-observable/blob/master/CONTRIBUTING.md) has information on getting help, reporting bugs, developing locally, and more.
22+
23+
## License
24+
25+
[MIT](https://github.com/canjs/can-simple-observable/blob/master/LICENSE.md)
26+

build.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
var stealTools = require("steal-tools");
2+
3+
stealTools.export({
4+
steal: {
5+
config: __dirname + "/package.json!npm"
6+
},
7+
outputs: {
8+
"+cjs": {},
9+
"+amd": {},
10+
"+global-js": {}
11+
}
12+
}).catch(function(e){
13+
14+
setTimeout(function(){
15+
throw e;
16+
},1);
17+
18+
});

0 commit comments

Comments
 (0)