Permalink
Browse files

First commit - everything's a mess

  • Loading branch information...
0 parents commit 4e231ba8fcf9b0ea976706cceab7861dd11f1704 Nicholas C. Zakas committed Oct 26, 2011
Showing with 10,152 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. 0 CHANGELOG
  3. +20 −0 LICENSE
  4. +12 −0 README.md
  5. +156 −0 build.xml
  6. BIN lib/js.jar
  7. +3,963 −0 lib/jshint.js
  8. +3,955 −0 lib/yuitest-rhino-cli.js
  9. +26 −0 src/core/data.js
  10. +82 −0 src/core/dom.js
  11. +27 −0 src/core/event.js
  12. +7 −0 src/core/nui.js
  13. +22 −0 src/tabview/layout.css
  14. +43 −0 src/tabview/tabview.js
  15. +3 −0 src/tabview/theme.css
  16. +64 −0 tests/all-rules.js
  17. +22 −0 tests/core/CSSLint.js
  18. +36 −0 tests/core/Reporter.js
  19. +76 −0 tests/css/width-100.html
  20. +44 −0 tests/formatters/checkstyle-xml.js
  21. +47 −0 tests/formatters/compact.js
  22. +42 −0 tests/formatters/csslint-xml.js
  23. +43 −0 tests/formatters/lint-xml.js
  24. +36 −0 tests/formatters/text.js
  25. +31 −0 tests/rules/adjoining-classes.js
  26. +211 −0 tests/rules/box-model.js
  27. +23 −0 tests/rules/box-sizing.js
  28. +47 −0 tests/rules/compatible-vendor-prefixes.js
  29. +213 −0 tests/rules/display-property-grouping.js
  30. +54 −0 tests/rules/duplicate-properties.js
  31. +18 −0 tests/rules/empty-rules.js
  32. +17 −0 tests/rules/errors.js
  33. +35 −0 tests/rules/floats.js
  34. +28 −0 tests/rules/font-faces.js
  35. +30 −0 tests/rules/font-sizes.js
  36. +51 −0 tests/rules/gradients.js
  37. +25 −0 tests/rules/ids.js
  38. +18 −0 tests/rules/import.js
  39. +27 −0 tests/rules/important.js
  40. +34 −0 tests/rules/known-properties.js
  41. +50 −0 tests/rules/outline-none.js
  42. +41 −0 tests/rules/overqualified-elements.js
  43. +19 −0 tests/rules/qualified-headings.js
  44. +52 −0 tests/rules/regex-selectors.js
  45. +36 −0 tests/rules/shorthand.js
  46. +41 −0 tests/rules/text-indent.js
  47. +47 −0 tests/rules/unique-headings.js
  48. +31 −0 tests/rules/universal-selector.js
  49. +71 −0 tests/rules/vendor-prefix.js
  50. +37 −0 tests/rules/zero-units.js
  51. +138 −0 tests/testrunner.htm
@@ -0,0 +1 @@
+build/
No changes.
20 LICENSE
@@ -0,0 +1,20 @@
+NUI
+Copyright (c) 2011 Nicholas C. Zakas. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,12 @@
+# NUI
+
+The New User Interface (NUI) project is an **experimental** web UI library with the goal of allowing developers to create rich, interactive web pages without writing a single line of JavaScript.
+
+## EXPERIMENT!!
+
+NUI is an **experiment** and therefore:
+
+* Should **not** be used until otherwise specified
+* Is not ready to accept pull requests
+* Does not have documentation
+* May be discontinued at any point in time without warning
156 build.xml
@@ -0,0 +1,156 @@
+<project name="nui" default="build.all">
+
+ <!-- version number -->
+ <property name="nui.version" value="0.1.0" />
+
+ <!-- the directories containing the source files -->
+ <property name="src.dir" value="./src" />
+ <property name="tests.dir" value="./tests" />
+
+ <!-- the directories and files to output to -->
+ <property name="build.dir" value="./build" />
+ <property name="release.dir" value="./release" />
+
+ <!-- the directory containing library files -->
+ <property name="lib.dir" value="./lib" />
+
+ <!-- library files -->
+ <property name="jshint.js" value="jshint.js" />
+ <property name="yuitest.js" value="yuitest.js" />
+
+ <!-- output filenames -->
+ <property name="core.build.file" value="nui.js"/>
+
+ <!-- embeddable license -->
+ <loadfile property="license.text" srcfile="LICENSE" />
+
+ <!-- get a timestamp -->
+ <tstamp>
+ <format property="RIGHT_NOW"
+ pattern="d-MMMM-yyyy hh:mm:ss"
+ locale="en,US"/>
+ </tstamp>
+ <tstamp>
+ <format property="SIMPLE_DATE"
+ pattern="MMMM d, yyyy"
+ locale="en,US"/>
+ </tstamp>
+
+ <!-- clean -->
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ </target>
+
+ <target name="changelog.update">
+ <exec executable="git" failonerror="true" outputproperty="git.tag">
+ <arg line="tag"/>
+ </exec>
+ <script language="javascript"><![CDATA[
+ //get the most recent tag to get the diff
+ var tags = nui.getProperty("git.tag").replace("\r", "").split("\n"),
+ lastTag = tags[tags.length-1];
+ nui.setProperty("git.log.range", lastTag + "..HEAD");
+ ]]></script>
+
+ <!-- git log -pretty=format:'* %s (%an)' v0.4.0..v0.5.0-->
+ <exec executable="git" failonerror="true" outputproperty="git.changelog">
+ <arg line="log --pretty=format:'* %s (%an)' ${git.log.range}"/>
+ </exec>
+
+ <concat destfile="CHANGELOG.tmp" fixlastline="true">
+ <header trimleading="yes">${SIMPLE_DATE} - v${nui.version}
+
+ ${git.changelog}
+
+ </header>
+ <fileset dir="." includes="CHANGELOG" />
+ </concat>
+
+ <delete file="CHANGELOG"/>
+ <move file="CHANGELOG.tmp" tofile="CHANGELOG"/>
+
+ </target>
+
+ <!-- validate JS files with JSHint -->
+ <target name="lint">
+ <fileset dir="${src.dir}" includes="**/*.js" id="jsfiles.raw"/>
+ <pathconvert pathsep=" " property="jsfiles.clean" refid="jsfiles.raw" />
+ <exec executable="java">
+ <arg line="-jar"/>
+ <arg path="${lib.dir}/js.jar"/>
+ <arg path="${lib.dir}/jshint.js" />
+ <arg line="${jsfiles.clean} curly=true,forin=true,latedef=true,noempty=true,undef=true,rhino=false" />
+ </exec>
+ </target>
+
+ <!-- run tests on the command line -->
+ <target name="test" depends="build.all,lint,test.general.rules">
+ <exec executable="java" failonerror="true">
+ <arg line="-jar"/>
+ <arg path="${lib.dir}/js.jar"/>
+ <arg path="${lib.dir}/yuitest-rhino-cli.js" />
+ <arg path="${build.dir}/${core.build.file}" />
+ <arg path="${build.dir}/${tests.build.file}" />
+ </exec>
+ </target>
+
+ <!-- must be done separately from other tests due to Rhino limitations -->
+ <target name="test.general.rules">
+ <exec executable="java" failonerror="true">
+ <arg line="-jar"/>
+ <arg path="${lib.dir}/js.jar"/>
+ <arg path="${lib.dir}/yuitest-rhino-cli.js" />
+ <arg path="${build.dir}/${core.build.file}" />
+ <arg path="${tests.dir}/all-rules.js" />
+ </exec>
+ </target>
+
+ <!-- build the core library -->
+ <target name="build.core">
+ <concat destfile="${build.dir}/${core.build.file}" fixlastline="true">
+ <header trimleading="yes">/*!
+ ${license.text}
+ */
+ /* Build time: ${RIGHT_NOW} */
+ </header>
+ <filelist dir="${src.dir}/core" files="nui.js" />
+ <fileset dir="${src.dir}/" includes="*.js" excludes="core/nui.js"/>
+
+ </concat>
+ </target>
+
+
+ <!-- build the tests into a single file -->
+ <target name="build.tests">
+ <concat destfile="${build.dir}/${tests.build.file}" fixlastline="true">
+ <fileset dir="${tests.dir}/" includes="**/*.js" excludes="all-rules.js" />
+ </concat>
+ </target>
+
+ <!-- Create a release with version number embedded -->
+ <target name="release" depends="test,build.all,changelog.update">
+ <delete dir="${release.dir}" />
+ <mkdir dir="${release.dir}"/>
+ <copy todir="${release.dir}">
+ <fileset dir="${build.dir}" includes="**/*" />
+ </copy>
+ <replaceregexp match="@VERSION@" replace="${nui.version}" flags="g" byline="true">
+ <fileset dir="${release.dir}" includes="**/*"/>
+ </replaceregexp>
+ </target>
+
+ <!-- Update CSS parser with the latest -->
+ <target name="parser.update">
+ <get src="${parser.url}" dest="${lib.dir}/${parserlib.js}" />
+ </target>
+
+ <!-- Update JSHint with the latest -->
+ <target name="jshint.update">
+ <get src="${jshint-rhino.url}" dest="${lib.dir}/" />
+ <get src="${jshint.url}" dest="${lib.dir}/" />
+ </target>
+
+ <!-- Build all files -->
+ <target name="build.all" depends="clean,build.core,build.tests,build.rhino"/>
+
+</project>
Binary file not shown.
Oops, something went wrong.

0 comments on commit 4e231ba

Please sign in to comment.