commit 855aabdd42e99983b02f69a7a03c99f4a0d330b4 Author: Dave Olsen Date: Sun Mar 1 22:04:35 2015 -0500 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27bc12f --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +composer.lock +config/* +export/* +packages/* +public/* +source/* +vendor/* diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dc8c7c4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2015 Brad Frost, http://bradfrostweb.com & Dave Olsen, http://dmolsen.com + +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. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a9bd21 --- /dev/null +++ b/README.md @@ -0,0 +1,47 @@ +# Pattern Lab Standard Edition for Twig [BETA] + +The Standard Edition for Twig gives developers and designers a clean base from which to develop Twig-based patterns. + +## Installing the Standard Edition for Twig + +### 1. Install Composer + +Pattern Lab uses [Composer](https://getcomposer.org/) to manage project dependencies. To install Composer type the following two lines in the command line: + + curl -sS https://getcomposer.org/installer | php + mv composer.phar /usr/local/bin/composer + +Then close and re-open your command line terminal. + +### 2. Install the Standard Edition + +Use Composer's `create-project` feature to install the Standard Edition into a location of your choosing. Type: + + cd install/location/ + composer create-project pattern-lab/edition-twig-standard your-project-name && cd $_ + +This will create a directory called `your-project-name`. + +### 3. Install a StarterKit + +To install a near-empty StarterKit project as a starting point you can run: + + php core/console --starterkit --init + +### 4. Generate Pattern Lab + +To generate Pattern Lab for the first time and make sure everything was installed correctly type: + + php core/console --generate + +To list all available commands type: + + php core/console --help + +### 5. Start the server to see your Pattern Lab web site + +You can use PHP's built-in web server to review your Pattern Lab project in a browser. In a new terminal window type: + + php core/console --server + +And then visit [http://localhost:8080](http://localhost:8080) diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..9ca5984 --- /dev/null +++ b/composer.json @@ -0,0 +1,48 @@ +{ + "name": "pattern-lab/edition-twig-standard", + "description": "The Twig-based Standard Edition of Pattern Lab. Installs all Twig-related assets except for a StarterKit.", + "keywords": ["pattern lab"], + "homepage": "http://patternlab.io", + "license": "MIT", + "type": "project", + "authors": [ + { + "name": "Dave Olsen", + "email": "dmolsen@gmail.com", + "homepage": "http://dmolsen.com", + "role": "Lead Developer" + } + ], + "support": { + "issues": "https://github.com/pattern-lab/patternlab-php/issues", + "wiki": "http://patternlab.io/docs/", + "source": "https://github.com/pattern-lab/patternlab-php/releases" + }, + "autoload": { + "psr-0": { + "PatternLab": "core/src/" + } + }, + "minimum-stability": "dev", + "prefer-stable": true, + "require": { + "php": ">=5.3.6", + "pattern-lab/core": "dev-dev", + "pattern-lab/patternengine-twig": "dev-dev", + "pattern-lab/styleguidekit-twig-default": "dev-dev" + }, + "scripts": { + "pre-install-cmd": [ + "PatternLab\\Installer::preInstallCmd" + ], + "post-package-install": [ + "PatternLab\\Installer::postPackageInstall" + ], + "post-package-update": [ + "PatternLab\\Installer::postPackageUpdate" + ], + "pre-package-uninstall": [ + "PatternLab\\Installer::prePackageUninstall" + ] + } +} diff --git a/core/bin/composer.phar b/core/bin/composer.phar new file mode 100644 index 0000000..caeca3c Binary files /dev/null and b/core/bin/composer.phar differ diff --git a/core/console b/core/console new file mode 100644 index 0000000..54203cb --- /dev/null +++ b/core/console @@ -0,0 +1,46 @@ +dispatch("config.configLoadEnd"); + +// run the console +Console::run(); diff --git a/core/scripts/README b/core/scripts/README new file mode 100644 index 0000000..c7f67be --- /dev/null +++ b/core/scripts/README @@ -0,0 +1 @@ +This is a Mac OS X-compatible script. If you don't have a Mac please use the command line instructions to install Pattern Lab. \ No newline at end of file diff --git a/core/scripts/installPatternLab.command b/core/scripts/installPatternLab.command new file mode 100644 index 0000000..000c009 --- /dev/null +++ b/core/scripts/installPatternLab.command @@ -0,0 +1,5 @@ +#!/bin/sh +DIR="$( cd "$( dirname "$0" )" && pwd )" +cd "$DIR/../../" +php "core/bin/composer.phar" install +php "core/console" -g \ No newline at end of file diff --git a/core/scripts/updateComposer.command b/core/scripts/updateComposer.command new file mode 100644 index 0000000..8068ca3 --- /dev/null +++ b/core/scripts/updateComposer.command @@ -0,0 +1,4 @@ +#!/bin/sh +DIR="$( cd "$( dirname "$0" )" && pwd )" +cd "$DIR/../../" +php "core/bin/composer.phar" self-update \ No newline at end of file diff --git a/core/server/router.php b/core/server/router.php new file mode 100644 index 0000000..42976b9 --- /dev/null +++ b/core/server/router.php @@ -0,0 +1,41 @@ +