Skip to content

Commit

Permalink
Begin rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed May 4, 2016
1 parent 5296770 commit 070ec5f
Show file tree
Hide file tree
Showing 67 changed files with 881 additions and 3,218 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "bower_components"
}
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# http://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.json]
indent_style = space
indent_size = 2

[*.txt,wp-config-sample.php]
end_of_line = crlf
82 changes: 82 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
node_modules
release
vendor
composer.lock
phpunit.xml
.idea
# Created by https://www.gitignore.io/api/osx,node,grunt

### OSX ###
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


### Node ###
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history


### grunt ###
# Grunt usually compiles files inside this directory
dist/

# Grunt usually preprocesses files such as coffeescript, compass... inside the .tmp directory
.tmp/

Expand Down
20 changes: 20 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": true,
"newcap": true,
"noarg": true,
"sub": true,
"undef": true,
"boss": true,
"eqnull": true,
"validthis": true,
"globals": {
"exports": true,
"module": false,
"console": true,
"document": true,
"window": true,
}
}
31 changes: 31 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = function (grunt) {

// require `load-grunt-tasks`, which loads all grunt tasks defined in package.json
require('load-grunt-tasks')(grunt);
// load tasks defined in the `/tasks` folder
grunt.loadTasks('tasks');

// Function to load the options for each grunt module
var loadConfig = function (path) {
var glob = require('glob');
var object = {};
var key;

glob.sync('*', {cwd: path}).forEach(function(option) {
key = option.replace(/\.js$/,'');
object[key] = require(path + option);
});

return object;
};

var config = {
pkg: grunt.file.readJSON('package.json'),
env: process.env
};

grunt.util._.extend(config, loadConfig('./tasks/options/'));

grunt.initConfig(config);

};
3 changes: 3 additions & 0 deletions assets/css/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Styles

Only final CSS styles should exist in this folder. If you are using SASS, LESS, autoprefixer, or some other pre-processor, please place your raw source files in a subdirectory.
7 changes: 7 additions & 0 deletions assets/css/sass/gathercontent-importer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* GatherContent Importer
* http://www.gathercontent.com
*
* Copyright (c) 2016 GatherContent
* Licensed under the GPL-2.0+ license.
*/
13 changes: 13 additions & 0 deletions assets/js/src/gathercontent-importer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* GatherContent Importer
* http://www.gathercontent.com
*
* Copyright (c) 2016 GatherContent
* }Licensed under the GPL-2.0+ license.
*/

( function( window, undefined ) {
'use strict';


} )( this );
31 changes: 31 additions & 0 deletions bootstrap.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
if ( ! defined( 'PROJECT' ) ) {
define( 'PROJECT', __DIR__ . '/includes/' );
}

if ( ! defined( 'GATHERCONTENT_DIR' ) ) {
define( 'GATHERCONTENT_DIR', __DIR__ . '/' );
}

// Place any additional bootstrapping requirements here for PHP Unit.
if ( ! defined( 'WP_LANG_DIR' ) ) {
define( 'WP_LANG_DIR', 'lang_dir' );
}
if ( ! defined( 'GATHERCONTENT_PATH' ) ) {
define( 'GATHERCONTENT_PATH', 'path' );
}

if ( ! file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
throw new PHPUnit_Framework_Exception(
'ERROR' . PHP_EOL . PHP_EOL .
'You must use Composer to install the test suite\'s dependencies!' . PHP_EOL
);
}

require_once __DIR__ . '/vendor/autoload.php';

require_once __DIR__ . '/tests/phpunit/test-tools/TestCase.php';

WP_Mock::setUsePatchwork( true );
WP_Mock::bootstrap();
WP_Mock::tearDown();
23 changes: 23 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "gathercontent-importer",
"version": "3.0.0",
"main": "/",
"license": "GPL-2.0+",
"ignore": [
"**/.*",
"*.md",
"assets/css/sass/*",
"assets/css/src/*",
"assets/js/src/*",
"assets/js/vendor/*",
"images/src/*",
"tests",
"bootstrap.php",
"Gruntfile.js",
"package.json",
"composer.json",
"phpunit.xml.dist"
],
"devDependencies": {},
"keywords": []
}
27 changes: 27 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "gathercontent-importer",
"description": "Imports items from GatherContent to your wordpress site",
"version": "3.0.0",
"type": "wordpress-plugin",
"keywords": [],
"homepage": "http://www.gathercontent.com",
"license": "GPL-2.0+",
"authors": [
{
"name": "GatherContent",
"email": "[email protected]",
"homepage": "http://www.gathercontent.com",
"role": "Developer"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=5.6"
},
"require-dev": {
"antecedent/patchwork": "1.2.*",
"phpunit/phpunit" : "*@stable",
"brianium/paratest" : "dev-master",
"10up/wp_mock" : "dev-master"
}
}
Loading

0 comments on commit 070ec5f

Please sign in to comment.