Skip to content

Commit

Permalink
Add initial package structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbrand committed Mar 3, 2015
0 parents commit 68dcc3b
Show file tree
Hide file tree
Showing 9 changed files with 347 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "src/bower_components"
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
src/bower_components
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
BOWER ?= node_modules/.bin/bower
HTTPSERVE ?= node_modules/.bin/http-server

all:: designerhappy

########################################################################
## Install dependencies

stamp-npm: package.json
npm install
touch stamp-npm

stamp-bower: stamp-npm
$(BOWER) install
touch stamp-bower

clean::
rm -f stamp-npm stamp-bower
rm -rf node_modules src/bower_components ~/.cache/bower


designerhappy:: stamp-npm stamp-bower
printf "\n\n Designer, you can be happy now.\n Go to http://localhost:4001/ to see a demo \n\n\n\n"
$(HTTPSERVE) -p 4001
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pat-editor

A Patternslib pattern which adds a WYSIWYG HTML editor, based on [Aloha Editor](http://www.alohaeditor.org)

##demo

To view a demo of how this pattern works, clone the repository:

git clone https://github.com/Patternslib/pat-editor.git

Run the Makefile:

make

And then in your browser open: http://localhost:4001
24 changes: 24 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "pat-editor",
"version": "0.0.1",
"authors": [
"JC Brand <[email protected]>"
],
"description": "A Patternslib WYSIWYG editor pattern",
"main": "src/pat-editor.js",
"keywords": [
"editor",
"aloha",
"wysiwyg",
"html"
],
"license": "BSD",
"ignore": [
"node_modules",
"bower_components"
],
"dependencies": {
"aloha-editor": "~1.1.0",
"patternslib": "master"
}
}
19 changes: 19 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Aloha Editor Pattern demo</title>
<link rel="stylesheet" href="src/bower_components/aloha-editor/src/demo-app/app/css/bootstrap.css" />
<link rel="stylesheet" href="src/bower_components/aloha-editor/src/demo-app/app/css/aloha-editor-demo.css" />
<script data-main="../main" src="../src/bower_components/requirejs/require.js"></script>
</head>
<body>
<div id="container">
<div>
<div class="item">
<h1>Masonry Pattern demo</h1>
</div>
</div>
</div>
</body>
</html>
207 changes: 207 additions & 0 deletions main.js

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "pat-editor",
"version": "0.0.1",
"title": "Patternslib plugin for a WYSIWYG editor, based on Aloha Editor.",
"repository": "https://github.com/Patternslib/pat-editor.git",
"licences": [
{
"type": "BSD",
"URL": "LICENSE"
}
],
"devDependencies": {
"bower": "latest",
"requirejs": ""
},
"homepage": "https://gitub.com/Patternslib/pat-editor",
"maintainers": [
{
"name": "JC Brand",
"email": "[email protected]"
}
],
"dependencies": {
"http-server": "^0.7.3"
}
}
27 changes: 27 additions & 0 deletions src/pat-editor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([
"jquery",
"mockup-patterns-base",
"pat-registry",
"pat-parser",
"aloha"
], function() {
return factory.apply(this, arguments);
});
} else {
factory($, Base, root.patterns, root.patterns.Parser, Aloha);
}
}(this, function($, Base, registry, Parser, Aloha) {
'use strict';
var parser = new Parser("editor");

return Base.extend({
name: 'editor',
trigger: ".pat-editor",

init: function patEditor($el, opts) {
debugger;
}
});
}));

0 comments on commit 68dcc3b

Please sign in to comment.