This repository has been archived by the owner on Apr 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
638 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
#Sidetap | ||
|
||
We're working on it! | ||
|
||
##Building Files Using Grunt | ||
|
||
Sidetap's javascript and css are written using coffeescript and less respectively. Each of these file types must be compiled before they can be used by the browser. To do this easily, we're using the excellent [grunt build system](). To use the build system, you must first install [node]() and [npm](). | ||
|
||
1. Install grunt: ``npm install grunt`` | ||
2. Install grunt-contrib: ``npm install grunt-contrib`` | ||
3. That's it. | ||
|
||
There are a few available commands. | ||
|
||
- ``grunt`` or ``grunt build``: build the css & js files | ||
- ``grunt watch``: build the css & js files whenever the less or coffee files change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* grunt | ||
* CoffeeScript example | ||
*/ | ||
module.exports = function(grunt){ | ||
|
||
grunt.initConfig({ | ||
lint: { | ||
files: ['grunt.js', 'src/*.js'] | ||
}, | ||
coffee: { | ||
compile: { | ||
options: { | ||
bare: true | ||
}, | ||
files: { | ||
'src/sidetap.js': 'src/coffee/sidetap.coffee', | ||
'src/sidetap_standard.js': 'src/coffee/sidetap_standard.coffee', | ||
'src/sidetap_ios.js': 'src/coffee/sidetap_ios.coffee', | ||
'src/sidetap_merged.js': ['src/coffee/*.coffee'] | ||
} | ||
} | ||
}, | ||
less: { | ||
compile: { | ||
files: { | ||
'src/sidetap.css': 'src/less/sidetap.less' | ||
} | ||
} | ||
}, | ||
watch: { | ||
dist1: { | ||
files: 'src/coffee/*', | ||
tasks: 'coffee' | ||
}, | ||
dist2: { | ||
files: 'src/less/*', | ||
tasks: 'less' | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib'); | ||
grunt.registerTask('build', 'coffee less'); | ||
grunt.registerTask('default', 'coffee less'); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"author": "harvest", | ||
"name": "sidetap", | ||
"version": "0.1.1", | ||
"description": "Some other day.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/harvesthq/sidetap" | ||
}, | ||
"engines": { | ||
"node": ">=0.4.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"coffee-script": ">= 1.2", | ||
"less": ">= 418", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
(function() { | ||
/* | ||
Constructor function for Sidetap | ||
*/ this.sidetap = function() { | ||
var ios5; | ||
ios5 = navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad)/) && window.SharedWorker; | ||
if (ios5) { | ||
return new SidetapIos(); | ||
} else { | ||
return new SidetapStandard(); | ||
} | ||
}; | ||
}).call(this); | ||
/* | ||
Constructor function for Sidetap | ||
*/ | ||
|
||
this.sidetap = function() { | ||
var ios5; | ||
ios5 = navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad)/) && window.SharedWorker; | ||
if (ios5) { | ||
return new SidetapIos(); | ||
} else { | ||
return new SidetapStandard(); | ||
} | ||
}; |
Oops, something went wrong.