Skip to content
This repository has been archived by the owner on Feb 2, 2020. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
clmath committed Jul 25, 2014
0 parents commit 4e47337
Show file tree
Hide file tree
Showing 25 changed files with 248 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": ".."
}
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
The "New" BSD License:
**********************

Copyright (c) 2005-2014, The Dojo Foundation
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the Dojo Foundation nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# delite-build

Build version of [ibm-js/delite](https://github.com/ibm-js/delite).

## Status

No official release yet.

## Licensing

This project is distributed by the Dojo Foundation and licensed under the ["New" BSD License](./LICENSE).
All contributions require a [Dojo Foundation CLA](http://dojofoundation.org/about/claForm).
17 changes: 17 additions & 0 deletions boot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require.config({
"packages": [
{
"name": "delite",
"location": "delite-build"
},
{
"name": "decor",
"location": "decor-build"
},
{
"name": "dpointer",
"location": "dpointer-build"
}
]
});
define(["delite/layer","decor/boot","dpointer/boot"], function(){});
22 changes: 22 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "delite-build",
"version": "0.1.10-dev",
"dependencies": {
"dojo": ">=1.9.1",
"requirejs": "2.1.x",
"requirejs-domready": ">=2.0.1",
"requirejs-text": ">=2.0.11",
"decor-build": "0.1.0-dev",
"dpointer-build": ">=0.1.0-dev"
},
"devDependencies": {
"delite": "0.1.10-dev"
},
"ignore": [
".jshintrc",
".gitattributes",
".travis.yml",
"tests",
"CONTRIBUTING.md"
]
}
6 changes: 6 additions & 0 deletions layer.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions layer.map

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions samples/ExampleWidget.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>

<title>Delite - ExampleWidget</title>

<script type="text/javascript" src="../../requirejs/require.js"></script>

<script type="text/javascript">
require({
baseUrl:"../..",
config: {
// Automatic selection of iOS and holodark is temporarily disabled in delite/theme, but
// enable it for this sample.
"delite/theme": {
themeMap: [
[/Holodark|Android/, "holodark"],
[/iPhone|iPad/, "ios"],
[/.*/, "bootstrap"] // chrome, firefox, IE
]
}
}
},[
"delite/register",
"delite/samples/ExampleWidget",
"delite/theme!delite/themes/{{theme}}/global.css", // page level CSS
"requirejs-domready/domReady!"
], function (register) {
register.parse();
});
</script>

</head>
<body>
<h1>Example Widget</h1>

<d-example></d-example>

<br><br><br>
Switch theme:
<a href="./ExampleWidget.html">platform default</a>
<a href="./ExampleWidget.html?theme=ios">iOS</a>
<a href="./ExampleWidget.html?theme=holodark">holodark</a>
<a href="./ExampleWidget.html?theme=bootstrap">bootstrap</a>
</body>

</html>
17 changes: 17 additions & 0 deletions samples/ExampleWidget.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
define([
"delite/register",
"delite/CssState",
"delite/handlebars!./ExampleWidget/ExampleWidget.html",
"delite/theme!./ExampleWidget/themes/{{theme}}/ExampleWidget.css",
"requirejs-dplugins/has!bidi?delite/theme!./ExampleWidget/themes/{{theme}}/ExampleWidget_rtl.css"
], function (register, CssState, template) {

return register("d-example", [HTMLElement, CssState], {
// summary:
// Example widget for testing and as template for new widgets.

template: template,

baseClass: "d-example-widget"
});
});
1 change: 1 addition & 0 deletions samples/ExampleWidget/ExampleWidget.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<template>Example Widget</template>
7 changes: 7 additions & 0 deletions samples/ExampleWidget/themes/ExampleWidget_template.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Template for ExampleWidget CSS, included from themes/*/ExampleWidget.less files

.d-example-widget {
color: @example-color;
background: @example-background-color;
}

12 changes: 12 additions & 0 deletions samples/ExampleWidget/themes/ExampleWidget_template_rtl.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Template for ExampleWidget CSS, included from themes/*/ExampleWidget_rtl.less files

// Note that selectors are more selective than ExampleWidget.less because it's indeterminate which order the styles
// are inserted into the document.

.d-example-widget.d-rtl {
text-align: right;
}

.d-example-widget.d-rtl:before {
content: "(RTL variant) ";
}
7 changes: 7 additions & 0 deletions samples/ExampleWidget/themes/bootstrap/ExampleWidget.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.d-example-widget {
color: #dff0d8;
background: #3c763d;
}
.d-example-widget:after {
content: " (bootstrap theme)";
}
10 changes: 10 additions & 0 deletions samples/ExampleWidget/themes/bootstrap/ExampleWidget.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import "../../../../themes/bootstrap/variables";

@example-color: @state-success-bg;
@example-background-color: @state-success-text;

@import "../ExampleWidget_template";

.d-example-widget:after {
content: " (bootstrap theme)";
}
6 changes: 6 additions & 0 deletions samples/ExampleWidget/themes/bootstrap/ExampleWidget_rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.d-example-widget.d-rtl {
text-align: right;
}
.d-example-widget.d-rtl:before {
content: "(RTL variant) ";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../ExampleWidget_template_rtl";
7 changes: 7 additions & 0 deletions samples/ExampleWidget/themes/holodark/ExampleWidget.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.d-example-widget {
color: #ffffff;
background: #333333;
}
.d-example-widget:after {
content: " (holodark theme)";
}
10 changes: 10 additions & 0 deletions samples/ExampleWidget/themes/holodark/ExampleWidget.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import "../../../../themes/holodark/variables";

@example-color: @holo-color;
@example-background-color: @holo-grey2;

@import "../ExampleWidget_template";

.d-example-widget:after {
content: " (holodark theme)";
}
6 changes: 6 additions & 0 deletions samples/ExampleWidget/themes/holodark/ExampleWidget_rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.d-example-widget.d-rtl {
text-align: right;
}
.d-example-widget.d-rtl:before {
content: "(RTL variant) ";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../ExampleWidget_template_rtl";
7 changes: 7 additions & 0 deletions samples/ExampleWidget/themes/ios/ExampleWidget.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.d-example-widget {
color: #ffffff;
background: #5877a2;
}
.d-example-widget:after {
content: " (iOS theme)";
}
8 changes: 8 additions & 0 deletions samples/ExampleWidget/themes/ios/ExampleWidget.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@example-color: white;
@example-background-color: #5877a2;

@import "../ExampleWidget_template";

.d-example-widget:after {
content: " (iOS theme)";
}
6 changes: 6 additions & 0 deletions samples/ExampleWidget/themes/ios/ExampleWidget_rtl.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.d-example-widget.d-rtl {
text-align: right;
}
.d-example-widget.d-rtl:before {
content: "(RTL variant) ";
}
1 change: 1 addition & 0 deletions samples/ExampleWidget/themes/ios/ExampleWidget_rtl.less
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../ExampleWidget_template_rtl";
1 change: 1 addition & 0 deletions themes/layer_bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e47337

Please sign in to comment.